64 bit linker issues

Benjamin Thaut code at benjamin-thaut.de
Sat Dec 22 04:40:48 PST 2012


I wanted to fix 
http://d.puremagic.com/issues/show_bug.cgi?id=8936 and I'm 
currently trying to compile a little repro case in x64 on windows:

import core.stdc.stdio;
import core.sys.windows.windows;

void bar()
{
	throw new Exception("Ex");
}

void foo()
{
	bar();
}

void main(string[] args)
{
   printf("%s\n", (SetCurrentDirectoryA("C:\\") != 0) ? "true".ptr 
: "false".ptr);
   try
   {
     // Let's serach the whole C: drive!
	foo();
   }
   catch(Exception ex)
   {
	auto info = ex.info.toString() ~ "\0";
	printf("%s\n",info.ptr);
   }
}

I compiled with the latest git master branch versions of dmd and 
druntime. Druntime was build with the default win64.mak.

..\..\dmd\src\dmd.exe -m64 -g -debug -w -I..\..\druntime\import 
-property main.d -debuglib=..\..\druntime\lib\druntime64.lib 
-defaultlib=..\..\druntime\lib\druntime64.lib user32.lib 
-L"/LIBPATH:\"C:\Program Files (x86)\Microsoft 
SDKs\Windows\v7.0A\lib\x64\"" -L"/LIBPATH:\"C:\Program Files 
(x86)\Microsoft Visual Studio 10.0\VC\lib\amd64\"" -L/NOLOGO

The error message I get is:
LIBCMT.lib(amdsecgs.obj) : fatal error LNK1103: debugging 
information corrupt; recompile module

Compiling in release works just fine. As soon as I add -g or -gc 
it breaks.

Any ideas what I could have done worng?

Kind Regards
Benjamin Thaut


More information about the Digitalmars-d mailing list