On Wednesday, 14 March 2018 at 00:43:52 UTC, Rubn wrote:
Yah it's not fun.

Some notes:

You might need to set MSVC_CC environment variable cause it doesn't use the right format for VS path, depending on your version.

https://github.com/dlang/dmd/blob/v2.079.0/src/vcbuild/msvc-dmc.d#L19


You could open a command prompt with the batch file running which will add variables used by the script.

C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/vcvarsall.bat


You should be able to build it now with just:

make -f win64.mak reldmd

Thanks, but now I'm stuck on this:

[...]

vcbuild\msvc-dmc -cpp -o..\generated\windows\release\64\optabgen.exe dmd\backend\optabgen -DMARS -DDM_TARGET_CPU_X86=1 -Idmd\tk "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe" /nologo /Ivcbuild /Idmd\root /FIwarnings.h ^"/D_HAS_EXCEPTIONS=0^" ^"/Wv:18^" /TP /Fe..\generated\windows\release\64\optabgen.exe dmd\backend\optabgen.c -DMARS ^"-DDM_TARGET_CPU_X86=1^" /Idmd\tk
optabgen.c
optabgen.obj : error LNK2019: unresolved external symbol __report_rangecheckfailure referenced in function "void __cdecl dotytab(void)" (?dotytab@@YAXXZ) optabgen.obj : error LNK2019: unresolved external symbol __acrt_iob_func referenced in function printf optabgen.obj : error LNK2019: unresolved external symbol fclose referenced in function "void __cdecl dotab(void)" (?dotab@@YAXXZ) optabgen.obj : error LNK2019: unresolved external symbol fopen referenced in function "void __cdecl dotab(void)" (?dotab@@YAXXZ) optabgen.obj : error LNK2019: unresolved external symbol __stdio_common_vfprintf referenced in function _vfprintf_l optabgen.obj : error LNK2019: unresolved external symbol exit referenced in function "void __cdecl dotab(void)" (?dotab@@YAXXZ) optabgen.obj : error LNK2019: unresolved external symbol _wassert referenced in function "void __cdecl doreltables(struct _iobuf *)" (?doreltables@@YAXPEAU_iobuf@@@Z) optabgen.obj : error LNK2001: unresolved external symbol __GSHandlerCheck optabgen.obj : error LNK2019: unresolved external symbol __security_check_cookie referenced in function "void __cdecl doreltables(struct _iobuf *)" (?doreltables@@YAXPEAU_iobuf@@@Z) optabgen.obj : error LNK2019: unresolved external symbol __security_cookie referenced in function "void __cdecl doreltables(struct _iobuf *)" (?doreltables@@YAXPEAU_iobuf@@@Z)
LINK : error LNK2001: unresolved external symbol mainCRTStartup
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\libcpmt.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64' C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\LIBCMT.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64' ..\generated\windows\release\64\optabgen.exe : fatal error LNK1120: 11 unresolved externals


Reply via email to