Jump to page: 1 2
Thread overview
Compile/link Win64
Jan 10, 2014
Nick Sabalausky
Jan 10, 2014
Vladimir Panteleev
Jan 10, 2014
Nick Sabalausky
Jan 12, 2014
Vladimir Panteleev
Jan 10, 2014
Brad Anderson
Jan 10, 2014
Nick Sabalausky
Jan 10, 2014
Brad Anderson
Jan 16, 2014
Vladimir Panteleev
Jan 10, 2014
Nick Sabalausky
Jan 10, 2014
Rainer Schuetze
Jan 10, 2014
Nick Sabalausky
Jan 12, 2014
Erik van Velzen
Jan 15, 2014
Nick Sabalausky
Jan 16, 2014
Vladimir Panteleev
January 10, 2014
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.
January 10, 2014
On Friday, 10 January 2014 at 20:02:49 UTC, Nick Sabalausky wrote:
> LINK : fatal error LNK1104: cannot open file 'shell32.lib'

What are your LIB and LIBPATH environment variables set to?
January 10, 2014
On 1/10/2014 3:06 PM, Vladimir Panteleev wrote:
> On Friday, 10 January 2014 at 20:02:49 UTC, Nick Sabalausky wrote:
>> LINK : fatal error LNK1104: cannot open file 'shell32.lib'
>
> What are your LIB and LIBPATH environment variables set to?

>echo %LIB%
C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\lib;

>echo %LIBPATH%
C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\LIB

January 10, 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?
January 10, 2014
On 1/10/2014 3:19 PM, Brad Anderson wrote:
>
> 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?

Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat was supposed to set up all of that.

January 10, 2014
On Friday, 10 January 2014 at 20:26:35 UTC, Nick Sabalausky wrote:
> On 1/10/2014 3:19 PM, Brad Anderson wrote:
>>
>> 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?
>
> Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat was supposed to set up all of that.

Appears to be a common problem with VC2008:

http://stackoverflow.com/questions/1102689/windowssdkdir-is-not-set-correctly-in-visual-studio-2008
January 10, 2014
On 1/10/2014 3:26 PM, Nick Sabalausky wrote:
> On 1/10/2014 3:19 PM, Brad Anderson wrote:
>>
>> 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?
>
> Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat
> was supposed to set up all of that.
>

It's also not set if I go into VS's [idiotic] "Visual Studio Command Prompt" either. :/

January 10, 2014

On 10.01.2014 21:34, Nick Sabalausky wrote:
> On 1/10/2014 3:26 PM, Nick Sabalausky wrote:
>> On 1/10/2014 3:19 PM, Brad Anderson wrote:
>>>
>>> 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?
>>
>> Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat
>> was supposed to set up all of that.
>>
>
> It's also not set if I go into VS's [idiotic] "Visual Studio Command
> Prompt" either. :/
>

IIRC this variable is read from the registry by vcvars*.bat, but uninstalling any SDK deletes the registry entry. So if you had multiple SDK versions installed, but removed one, the variable will no longer be set.
January 10, 2014
On 1/10/2014 3:56 PM, Rainer Schuetze wrote:
>
>
> On 10.01.2014 21:34, Nick Sabalausky wrote:
>> On 1/10/2014 3:26 PM, Nick Sabalausky wrote:
>>> On 1/10/2014 3:19 PM, Brad Anderson wrote:
>>>>
>>>> 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?
>>>
>>> Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat
>>> was supposed to set up all of that.
>>>
>>
>> It's also not set if I go into VS's [idiotic] "Visual Studio Command
>> Prompt" either. :/
>>
>
> IIRC this variable is read from the registry by vcvars*.bat, but
> uninstalling any SDK deletes the registry entry. So if you had multiple
> SDK versions installed, but removed one, the variable will no longer be
> set.

Hmm, I hadn't ever uninstalled it.

Regardless, *now* I've just uninstalled and reinstalled the Windows SDK, and re-ran vcvarsall.bat. The %WindowsSdkDir% is now set, but I'm still getting the same problem.

The %WindowsSdkDir% is set to "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A", but there doesn't appear to be much in there (Just a "Bootstrapper\Packages" directory with not much inside it either). I don't think it installed correctly. There doesn't appear to be any other Windows SDK installation AFAICT either. Stupid f#&*^&# microsoft tools...

In any case, the issue I was hunting down turned out to be Posix-related instead of 64-bit-related anyway, so I'm not going to deal with this anymore for the time being.

January 12, 2014
On Friday, 10 January 2014 at 20:18:55 UTC, Nick Sabalausky wrote:
> On 1/10/2014 3:06 PM, Vladimir Panteleev wrote:
>> On Friday, 10 January 2014 at 20:02:49 UTC, Nick Sabalausky wrote:
>>> LINK : fatal error LNK1104: cannot open file 'shell32.lib'
>>
>> What are your LIB and LIBPATH environment variables set to?
>
> >echo %LIB%
> C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\LIB;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\lib;
>
> >echo %LIBPATH%
> C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\LIB

That's not right. If you're building for x64, the LIB paths should contain amd64 library directories.

Are you running the vcvarsall batch file with the right parameter ("amd64")?
« First   ‹ Prev
1 2