D on Windows - linker question
Erik van Velzen
erik at evanv.nl
Fri Oct 18 09:40:48 PDT 2013
Hello,
I have set up my enviroment according to these instructions:
http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_%28COFF-compatible%29
When I compile a small tutorial program I get this error:
error LNK2019: unresolved external symbol MessageBoxW referenced
in function WinMain
I have to manually specify "User32.Lib" to dmd when I want to
compile my program (or move User32.Lib to my project directory).
Is this normal?
Below is my sc.ini.
[Environment]
LIB="%DIR_WINSDK%\Lib\x64";"%DIR_MSVC%\lib\amd64";"%@P%\..\lib"
DFLAGS="-I%@P%\..\..\src\phobos"
"-I%@P%\..\..\src\druntime\import" "-m64"
LINKCMD=%@P%\link.exe
LINKCMD64=%DIR_MSVC%\bin\amd64\link.exe
Obviously User32.Lib resides in "%DIR_WINSDK%\Lib\x64". This
directory resolves correctly in windows explorer to "C:\Program
Files\Microsoft SDKs\Windows\v7.1\Lib\x64"
More information about the Digitalmars-d-learn
mailing list