digitalmars.D.learn - Compile/link Win64
- Nick Sabalausky (20/21) Jan 10 2014 I never seem to be able to remember how to get 64-bit going on windows.
- Vladimir Panteleev (2/3) Jan 10 2014 What are your LIB and LIBPATH environment variables set to?
- Nick Sabalausky (8/13) Jan 10 2014 C:\Program Files (x86)\Microsoft Visual Studio
- Vladimir Panteleev (5/20) Jan 12 2014 That's not right. If you're building for x64, the LIB paths
- Brad Anderson (7/29) Jan 10 2014 I don't have VC2008 so I unfortunately could not test while I was
- Nick Sabalausky (3/8) Jan 10 2014 Hmm, that's strange, %WindowsSdkDir% isn't set. I thought vcvarsall.bat
- Brad Anderson (3/16) Jan 10 2014 Appears to be a common problem with VC2008:
- Vladimir Panteleev (4/8) Jan 16 2014 According to this post[1], he is using VC2005 (VS8), not 2008.
- Nick Sabalausky (3/12) Jan 10 2014 It's also not set if I go into VS's [idiotic] "Visual Studio Command
- Rainer Schuetze (4/18) Jan 10 2014 IIRC this variable is read from the registry by vcvars*.bat, but
- Nick Sabalausky (13/34) Jan 10 2014 Hmm, I hadn't ever uninstalled it.
- Erik van Velzen (3/13) Jan 12 2014 The lastest Windows SDK installs to C:\Program Files
- Nick Sabalausky (3/18) Jan 15 2014 "\Program Files (x86)\Windows Kits\" doesn't exist :(
- Vladimir Panteleev (11/13) Jan 16 2014 Nick, did you notice my reply from 4 days ago?
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.dGives 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.
Jan 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?
Jan 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
Jan 10 2014
On Friday, 10 January 2014 at 20:18:55 UTC, Nick Sabalausky wrote:On 1/10/2014 3:06 PM, Vladimir Panteleev wrote: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")?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
Jan 12 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"); }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?[path_to]dmd.2.064.2\dmd2\windows\bin\dmd -m64 hello.dGives 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.
Jan 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.
Jan 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:Appears to be a common problem with VC2008: http://stackoverflow.com/questions/1102689/windowssdkdir-is-not-set-correctly-in-visual-studio-2008I 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.
Jan 10 2014
On Friday, 10 January 2014 at 20:32:53 UTC, Brad Anderson wrote:According to this post[1], he is using VC2005 (VS8), not 2008. 2005 comes with its own copy of the SDK, under VC/PlatformSDK. http://forum.dlang.org/post/lapkjf$pio$1 digitalmars.comHmm, 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
Jan 16 2014
On 1/10/2014 3:26 PM, Nick Sabalausky wrote:On 1/10/2014 3:19 PM, Brad Anderson wrote:It's also not set if I go into VS's [idiotic] "Visual Studio Command Prompt" either. :/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.
Jan 10 2014
On 10.01.2014 21:34, Nick Sabalausky wrote:On 1/10/2014 3:26 PM, Nick Sabalausky wrote: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.On 1/10/2014 3:19 PM, Brad Anderson wrote:It's also not set if I go into VS's [idiotic] "Visual Studio Command Prompt" either. :/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.
Jan 10 2014
On 1/10/2014 3:56 PM, Rainer Schuetze wrote:On 10.01.2014 21:34, Nick Sabalausky wrote: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 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.On 1/10/2014 3:26 PM, Nick Sabalausky wrote: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.On 1/10/2014 3:19 PM, Brad Anderson wrote:It's also not set if I go into VS's [idiotic] "Visual Studio Command Prompt" either. :/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.
Jan 10 2014
On Friday, 10 January 2014 at 21:47:23 UTC, Nick Sabalausky wrote: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 AFAICTThe lastest Windows SDK installs to C:\Program Files (x86)\Windows Kits\8.1\
Jan 12 2014
On 1/12/2014 5:37 PM, Erik van Velzen wrote:On Friday, 10 January 2014 at 21:47:23 UTC, Nick Sabalausky wrote:"\Program Files (x86)\Windows Kits\" doesn't exist :( As I suspected, it must not have installed correctly.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 microsoft tools...The lastest Windows SDK installs to C:\Program Files (x86)\Windows Kits\8.1\
Jan 15 2014
On Wednesday, 15 January 2014 at 22:21:18 UTC, Nick Sabalausky wrote:"\Program Files (x86)\Windows Kits\" doesn't exist :( As I suspected, it must not have installed correctly.Nick, did you notice my reply from 4 days ago? http://forum.dlang.org/post/lumcuftlvokawuneqftb forum.dlang.org I believe that under certain conditions, the MS linker will just skip over libraries of certain bitness, so I suspect that might be your problem. I don't think the platform/Windows SDK is related to the problem in your first post because Visual Studio 2005 (VS8), which is what you had in your paths, comes with its own copy (the PlatformSDK directory).
Jan 16 2014