Can't compile 64 bits Visual Studio 2010 projects

女生的网名这么多〃 提交于 2019-12-10 10:59:38

问题


I have several VS 2010 projects that I can not compile at 64 bits (32 bits builds worke fine without any problem). I did extensive things, like Reset Visual Studio Settings, first by IDE, after by command line; repair, reinstall, etc. and could not compile the projects. It was always telling me that

cannot find ******.lib

where the lib file was always a system library. Examples:

fatal error LNK1104: cannot open file 'shlwapi.lib'
fatal error LNK1104: cannot open file 'kernel32.lib'

回答1:


After I asked a colleague for help, we noticed, that even getting clean builds of the projects from TFS, with overwrite option, the Project's Configuration Properties > VC++ Directories on my computer were always different from other computers.

Searching more we found the solution on the last post of Reset include/lib path, which I will fully transcribe:

use "del %HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props" is not always the right way.

Better use "del %USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user.props" where the application data folder is normally placed in.

Then I've looked inside the contents of Microsoft.Cpp.x64.user.props and I've seen that there were things added by Visual Leaks Detector. Which is reasonable, as one month before, I did a memory leak analysis using VLD.

So, I deleted the file and now everything compiles fine at 64bits!



来源:https://stackoverflow.com/questions/39472272/cant-compile-64-bits-visual-studio-2010-projects

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