X86 COFF format static libraries is very important for d, how to use them? -ms32coff?
FrankLike via Digitalmars-d
digitalmars-d at puremagic.com
Tue Nov 11 05:46:28 PST 2014
> I suspect you are compiling the druntime/phobos library with
> the 64-bit VC compiler. Make sure cl.exe is the compiler
> targeting 32-bit when running "make -fwin64.mak
> MODEL=m32mscoff".
I've done it as you said:compiling the druntime/phobos library
with the 64-bit VC compiler.and cl.exe is the compiler.
OPEN:%comspec% /k ""C:\Program Files (x86)\Microsoft Visual
Studio 10.0\VC\vcvarsall.bat"" amd64
set DM_HOME=h:\D
cd %DM_HOME%\dmd2\src\druntime
make -fwin64.mak MODEL=32mscoff
get the druntime32mscoff.lib and gcstub32mscoff.obj
do that on phobos,and get the phobos32mscoff.lib.
Then,I use it:
OPEN:%comspec% /k ""C:\Program Files (x86)\Microsoft Visual
Studio 10.0\VC\vcvarsall.bat"" x86
set DM_HOME=h:\D
set path=%path%;%DM_HOME%\dmd2\windows\bin;
set lib=C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\lib;C:\Program Files (x86)\Microsoft Visual Studio
10.0\VC\atlmfc\lib;C:\Program Files (x86)\Microsoft
SDKs\Windows\v7.0A\Lib;h:\D\dmd2\windows\libms32coff
dmd -c -m32mscoff a.d
link /machine:x86 a User32.lib shell32.lib ole32.lib
oleAut32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib
uuid.lib ws2_32.lib druntime32mscoff.lib gcstub32mscoff.obj
phobos32mscoff.lib /LARGEADDRESSAWARE:NO
but get the error as that ↑
Thank you.
More information about the Digitalmars-d
mailing list