Compile/link Win64

Brad Anderson eco at gnuk.net
Fri Jan 10 12:19:12 PST 2014


On Friday, 10 January 2014 at 20:02:49 UTC, Nick Sabalausky wrote:
> I never seem to be able to remember how to get 64-bit going on 
> windows.
>
> I've extracted the zip for DMD 2.064.2, I ran the 
> "vcvarsall.bat", but trying to compile this trivial hello world:
>
> import std.stdio;
> void main()
> {
> 	writeln("Hello");
> }
>
> > [path_to]dmd.2.064.2\dmd2\windows\bin\dmd -m64 hello.d
>
> Gives me this:
>
> LINK : fatal error LNK1104: cannot open file 'shell32.lib'
> --- errorlevel 1104
>
> On a slightly more complicated program (a simple mysql-native 
> test program), I get this:
>
> LINK : fatal error LNK1104: cannot open file 'ws2_32.lib'
> --- errorlevel 1104
>
> I also tried uncommenting the appropriate line in sc.ini:
>
> ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe
> to:
> LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe
>
> But that had no effect.

I don't have VC2008 so I unfortunately could not test while I was 
working on the installer/sc.ini update. Rainer says 2008 does 
work though. With modern VC there is a vcvars32.bat and 
vcvars64.bat to choose whether to use the 32-bit or 64-bit 
toolchain. What is the value of %WindowsSdkDir% within your 
vcvars.bat command prompt?


More information about the Digitalmars-d-learn mailing list