digitalmars.D - Compiling with -m64 on Windows uses wrong link location
- Josh (29/29) Nov 01 2014 I have Visual Studio 2012 and Windows SDK for Windows 8.1
- Rainer Schuetze (8/32) Nov 01 2014 That should work as is. Some ideas:
- Josh (12/63) Nov 01 2014 I only have 1 sc.ini, and -v showed the correct path. Setting the
- Rainer Schuetze (5/15) Nov 02 2014 I suspect that you have set the LINKCMD64 variable in your system
I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them: ---------------------------------------------------------------------------- ; Windows installer replaces the following lines with the actual paths VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ WindowsSdkDir=D:\Program Files (x86)\Windows Kits\8.1\ ; Windows installer uncomments the version detected ;VC2013 LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe ;VC2010 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ; needed with /DEBUG to find mspdb*.dll (only for VS2012 or VS2013) ;VC2013 PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE;%VCINSTALLDIR%\bin PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE ---------------------------------------------------------------------------- The problem is, when I compile something with -m64, I get the error: Can't run 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe', check PATH It's looking in ...\Microsoft Visual Studio 10.0, rather than ...\Microsoft Visual Studio 11.0 which is specified in sc.ini. Is there another step that I need to do? Thanks, Josh
Nov 01 2014
On 01.11.2014 14:25, Josh wrote:I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them: ---------------------------------------------------------------------------- ; Windows installer replaces the following lines with the actual paths VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ WindowsSdkDir=D:\Program Files (x86)\Windows Kits\8.1\ ; Windows installer uncomments the version detected ;VC2013 LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe ;VC2010 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ; needed with /DEBUG to find mspdb*.dll (only for VS2012 or VS2013) ;VC2013 PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE;%VCINSTALLDIR%\bin PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE ---------------------------------------------------------------------------- The problem is, when I compile something with -m64, I get the error: Can't run 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe', check PATH It's looking in ...\Microsoft Visual Studio 10.0, rather than ....\Microsoft Visual Studio 11.0 which is specified in sc.ini. Is there another step that I need to do? Thanks, JoshThat should work as is. Some ideas: - you might have another sc.ini in the working directory or your HOME directory which is picked up before the one alongside dmd.exe - for historic reasons LINKCMD64 setting/environment variable might also be used, maybe you have set this elsewhere in your sc.ini If you run dmd with option -v, it will show the used sc.ini and the command line used to call the linker.
Nov 01 2014
On Saturday, 1 November 2014 at 16:22:33 UTC, Rainer Schuetze wrote:On 01.11.2014 14:25, Josh wrote:I only have 1 sc.ini, and -v showed the correct path. Setting the LINKCMD64 variable in sc.ini fixed the issue, although it seems kind of redundant as I copied LINKCMD and just added 64: ; Windows installer uncomments the version detected ;VC2013 LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD64=%VCINSTALLDIR%\bin\x86_amd64\link.exe ;VC2010 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe Thanks for that Rainer.I have Visual Studio 2012 and Windows SDK for Windows 8.1 installed. I then used the DMD installer, which appears to have correctly found them: ---------------------------------------------------------------------------- ; Windows installer replaces the following lines with the actual paths VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\ WindowsSdkDir=D:\Program Files (x86)\Windows Kits\8.1\ ; Windows installer uncomments the version detected ;VC2013 LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe ;VC2010 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ; needed with /DEBUG to find mspdb*.dll (only for VS2012 or VS2013) ;VC2013 PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE;%VCINSTALLDIR%\bin PATH=%PATH%;%VCINSTALLDIR%\bin\x86_amd64;%VCINSTALLDIR%\..\Common7\IDE ---------------------------------------------------------------------------- The problem is, when I compile something with -m64, I get the error: Can't run 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe', check PATH It's looking in ...\Microsoft Visual Studio 10.0, rather than ....\Microsoft Visual Studio 11.0 which is specified in sc.ini. Is there another step that I need to do? Thanks, JoshThat should work as is. Some ideas: - you might have another sc.ini in the working directory or your HOME directory which is picked up before the one alongside dmd.exe - for historic reasons LINKCMD64 setting/environment variable might also be used, maybe you have set this elsewhere in your sc.ini If you run dmd with option -v, it will show the used sc.ini and the command line used to call the linker.
Nov 01 2014
On 01.11.2014 20:00, Josh wrote:I only have 1 sc.ini, and -v showed the correct path. Setting the LINKCMD64 variable in sc.ini fixed the issue, although it seems kind of redundant as I copied LINKCMD and just added 64: ; Windows installer uncomments the version detected ;VC2013 LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD=%VCINSTALLDIR%\bin\x86_amd64\link.exe LINKCMD64=%VCINSTALLDIR%\bin\x86_amd64\link.exe ;VC2010 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe ;VC2008 LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exeI suspect that you have set the LINKCMD64 variable in your system environment from trying earlier versions of dmd before. You can check this running "set LINKCMD64" from the command line.Thanks for that Rainer.Good to hear it got you going.
Nov 02 2014