Windows 64

Casper Færgemand" <shorttail at hotmail.com> Casper Færgemand" <shorttail at hotmail.com>
Mon Oct 7 16:08:46 PDT 2013


Okay, it's definitely a problem with dmd passing something bad to 
link. I was able to link it manually and the program was working 
fine.

import std.stdio;

void main() {
	writeln("Hello Linker!");
}

I ran "dmd -m64 test.d". The usual errors were dumped in the 
terminal. I then ran "link test.obj @lala.txt", with lala.txt 
containing the following:

C:\D\Tools\dmd2\windows\lib\phobos64.lib
"C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\lib\amd64\LIBCMT.lib"
"C:\Program Files (x86)\Microsoft Visual Studio 
11.0\VC\lib\amd64\oldnames.lib"
"C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64\shell32.lib"
"C:\Program Files\Microsoft 
SDKs\Windows\v7.1\Lib\x64\kernel32.lib"

After adding the five lines one by one, the linking succeeded and 
test.exe outputted "Hello Linker!".


So, how do I not link it manually? It's sorta acceptable for 
small things, but I want DDT and Eclipse to do it automatically.


More information about the Digitalmars-d-learn mailing list