Some questions about linking 64-bit programs on windows
Mikko
mikko at mailinator.com
Thu Nov 7 14:57:21 PST 2013
I'm using DMD 2.064.2 and 64-bit Windows 8.1. I have VS2013 and
Windows SDK 8.1 installed. I'm running DMD from the VS2013
developer console.
First of all there's a bug in sc.ini (line 70) when using these
program versions above. The platform libraries are under winv6.3
subdirectory instead of win8. If you don't fix that, you get
shell32.lib not found errors when linking.
I'm trying to link a very simple 64-bit GLFW program. In the end
I got everything working with following command (64-bit static
glfw3.lib is in the same directory):
dmd -m64 app.d glfw3.lib opengl32.lib user32.lib gdi32.lib
-L/NODEFAULTLIB:libcmt.lib
Some questions:
There were no instructions anywhere to include user32 and gdi32,
but the linking failed without them. Is that normal?
There was conflict with msvcrt.lib and libcmt.lib. Removing
libcmt worked. Why are they both included and is that normal?
Is it OK to give the library names straight to dmd instead of the
linker? Am I assuming right that the "opengl32.lib user32.lib
gdi32.lib" part is automagically linking to dynamic (DLL) 64-bit
windows libraries?
More information about the Digitalmars-d
mailing list