How does the Visual Studio 32-bit linker find the 64-bit linker?

拜拜、爱过 提交于 2021-02-08 14:59:40

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/52297557/how-does-the-visual-studio-32-bit-linker-find-the-64-bit-linker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!