无法编译64位Visual Studio 2010项目 [英] Can't compile 64 bits Visual Studio 2010 projects

查看:642
本文介绍了无法编译64位Visual Studio 2010项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个VS 2010项目,我无法编译64位(32位构建工作正常没有任何问题)。我做了大量的事情,像Rest Visual Studio设置,首先由IDE,后通过命令行;修复,重新安装等,无法编译项目。它总是告诉我



找不到******。lib



其中lib文件始终是系统库。示例:

 致命错误LNK1104:无法打开文件'shlwapi.lib'
致命错误LNK1104: kernel32.lib'


解决方案

,我们注意到,即使从TFS的项目的干净的构建,与覆盖选项,项目的配置属性> VC ++目录在我的计算机上总是不同于其他计算机。



搜索更多我们在重置include / lib路径,我将完全誊写:


使用del%HOMEPATH%\AppData\Local\Microsoft\MSBuild\v4.0\ Microsoft.Cpp.Win32.user.props



更好地使用del%USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0\ Microsoft。 Cpp.Win32.user.props,其中通常放置应用程序数据文件夹。


然后我查看了内容 Microsoft.Cpp.x64.user.props ,我看到有由Visual Leaks检测器添加的东西。这是合理的,因为一个月前,我使用VLD进行了内存泄漏分析。



所以,我删除了文件,现在一切编译正常64位! >

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 Rest 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'

解决方案

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!

这篇关于无法编译64位Visual Studio 2010项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆