On 12.11.2014 01:25, FrankLike wrote:

You have to compile druntime and phobos with the x86 compiler aswell.
Otherwise the C files in the library are built for the wrong
architecture.

So you should be fine if you use "x86" intead of "amd64" in the line
above.
--------------------------------------------
Sorry,get the same error.

  will create a.lib and a.exp
  druntime32mscoff.lib(dmain2_560_47b.obj):error LNK2019:Unresolved
external symbol _getErrno,the  symbol is referenced in __d_run_main
phobos32mscoff.lib(errno_229_226.obj):error LNK2001:Unresolved external
  symbol _getErrno
  a.exe:fatal error LNK1120:An unresolved external symbol.


Maybe you forgot to clean up the object files from the win64/win32-dmc build?

This is extracted from my build batch:

set dm_make=c:\l\dmc\bin\make
set DMD=../windows/bin/dmd.exe
set cl32=%VCINSTALLDIR%/bin/cl.exe
set ar32=%VCINSTALLDIR%/bin/lib.exe

cd druntime
del /q errno_c.obj complex.obj
%dm_make% -f win64.mak DMD=%DMD% MODEL=32mscoff "CC=\"%cl32%\""
if errorlevel 1 goto xit
cd ..

cd phobos
cd etc\c\zlib
%dm_make% -f win64.mak clean
cd ..\..\..
%dm_make% -f win64.mak DMD=%DMD% MODEL=32mscoff "CC=\"%cl32%\"" MAKE=%dm_make% "AR=\"%ar32%\""
if errorlevel 1 goto xit
cd ..

You might not need the CC and AR arguments to make if you use the VS2010 installation as expected by the makefiles.

[My mail program shows a line break in the last call to make, there should be no line break before "MAKE=%dm_make%".]

Reply via email to