I have a moderately large DLL, and when I link it, I get the error:
LINK : the 32-bit linker (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\ link.exe) ran out of heap space; restarting link with the 64-bit linker (C:\Program Files\Git\usr\bin\link.exe)
(line breaks added for readability)
As you might expect, using the Posix program to create symbolic or hard links with command line options intended for the Microsoft linker doesn't end well. (Specifically, it returns /c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/link: cannot create link ''$'\377\376''/' to '/ERRORREPORT:QUEUE': No such file or directory
)
How does the 32-bit Visual Studio linker find the 64-bit one? How can I persuade it to find the right one?
This is a known problem that should be fixed soon : https://developercommunity.visualstudio.com/content/problem/331351/linkexe-should-not-search-path-for-64-bit-version.html
Workaround :
This is definitely not a clean way to fix this but, adding C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\<14.16.xxxxxxxx>\bin\Hostx64\x64
ad the beginning of the PATH helped.
Of course, replace
<14.16.xxxxxxxx>
with the VC++ tool version that fits your working environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With