

`xyzzy`のUnicode版のビルドを試してみようと思ったのですが、エラーでできなかったので質問させてください。

まず Visual Studio Community 2017 でビルドするために platform toolset
を`Windows7.1SDK`から`Visual Studio 2017(v141)`に変更しました。

次にビルド時の下記のコマンドが

[code]

        <Target Name="PostBuildEvent" Condition="'$(PostBuildEventUseInBuild)'!='false'">
          <Message Text="Description: %(PostBuildEvent.Message)" Condition="'%(PostBuildEvent.Message)' != '' and '%(PostBuildEvent.Command)' != ''"/>
          <Exec Command="%(PostBuildEvent.Command)$(_BuildSuffix)" Condition="'%(PostBuildEvent.Command)' != ''"/>
        </Target>
    
[/code]

以下のようなエラーになってしまいます。

[code]

        Error   MSB3073 The command "cd "C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\src"
        "C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\gen\Debug\gen-ucs2tab.exe" > "C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\gen\Debug\ucs2tab.h"
        :VCEnd" exited with code 2. gen-ucs2tab C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets  133 
    
[/code]

`:VCEnd" exited with code 2`で検索しましたがどのように解決すればよいかわかりませんでした。

上から順番にエラーを確認していこうと思い他のエラーについてはまだ調べていませんが下記のエラーが出ています。

[code]

        Error   LNK2019 unresolved external symbol _memset referenced in function "int __cdecl run_xyzzy(int,wchar_t * *,wchar_t const *)" (?run_xyzzy@@YAHHPAPA_WPB_W@Z)   xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\xyzzycli.obj  1   
        Error   LNK2019 unresolved external symbol ___CxxFrameHandler3 referenced in function __unwindfunclet$?xmain@@YAHHPAPA_WPB_WH@Z$1   xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\xyzzycli.obj  1   
        Error   LNK2019 unresolved external symbol __CrtDbgReport referenced in function __CRT_RTC_INIT xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_init_.obj)   1   
        Error   LNK2019 unresolved external symbol __CrtDbgReportW referenced in function __CRT_RTC_INITW   xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_init_.obj)   1   
        Error   LNK2019 unresolved external symbol _strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol _strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol __wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)    xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol __wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)   xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol _wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)    xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)  xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)    xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)  xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4    xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_chandler4gs_.obj)    1   
        Error   LNK1120 14 unresolved externals xyzzycli    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\Debug\xyzzycli.exe    1   
        Error   LNK2019 unresolved external symbol _memcpy referenced in function "void __cdecl set_title(wchar_t *)" (?set_title@@YAXPA_W@Z)   xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\xyzzyenv.obj  1   
        Error   LNK2019 unresolved external symbol _memset referenced in function _process_startup  xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\xyzzyenv.obj  1   
        Error   LNK2019 unresolved external symbol __CrtDbgReport referenced in function __CRT_RTC_INIT xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_init_.obj)   1   
        Error   LNK2019 unresolved external symbol __CrtDbgReportW referenced in function __CRT_RTC_INITW   xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_init_.obj)   1   
        Error   LNK2019 unresolved external symbol _strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol _strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure@@YAXPAXPBD@Z) xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_error_.obj)  1   
        Error   LNK2019 unresolved external symbol __wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)    xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol __wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)   xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol _wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath@@YAHPB_WPA_WI@Z)    xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)  xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)    xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll@@YAPAUHINSTANCE__@@XZ)  xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_pdblkup_.obj)    1   
        Error   LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4    xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\MSVCRTD.lib(_chandler4gs_.obj)    1   
        Error   LNK1120 14 unresolved externals xyzzyenv    C:\Users\ironsand\dev\xyzzy-unicode\xyzzy\Debug\xyzzyenv.exe    1   
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 437 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 438 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 442 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 443 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 446 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 448 
        Error   C2065   'internal2wc_table': undeclared identifier  gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 457 
        Warning C4473   'printf' : not enough arguments passed for format string    gen-ibmext  c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\gen-ibmext.cc 457 
        Warning C4302   '<function-style-cast>': truncation from 'HKL' to 'LANGID'  xyzzy   c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\kbd.h 131 
        Error   C2039   'unique_ptr': is not a member of 'std'  xyzzy   c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\font.h    77  
        Error   C2143   syntax error: missing ';' before '<'    xyzzy   c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\font.h    77  
        Error   C4430   missing type specifier - int assumed. Note: C++ does not support default-int    xyzzy   c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\font.h    77  
        Error   C2238   unexpected token(s) preceding ';'   xyzzy   c:\users\ironsand\dev\xyzzy-unicode\xyzzy\src\font.h    77  
    
[/code]

それと`platform toolset`を`v141`に変えたものはこちらに`Fork`しておきました。  
<https://github.com/ironsand/xyzzy-unicode>

このような場合はどのような手順で問題を解決していけばよいのでしょうか？  
技術不足は自覚しているのですが、何かアドバイスを頂けたら幸いです。


CC BY-SA 3.0
2017-03-25T05:30:05.573
33520
2017-03-25T05:30:05.573
3271
question
visual-studio xyzzy
xyzzy-unicode のビルドで失敗する