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

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

问题描述

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

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

找不到******.lib

其中 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'

推荐答案

在我向一位同事寻求帮助后,我们注意到,即使从 TFS 获得干净的项目构建,带有覆盖选项,项目的配置属性 > VC++ 目录在我的电脑上总是与其他电脑不同.

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.

搜索更多,我们在 重置包含/lib 路径,我将完全转录:

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

使用del %HOMEPATH%AppDataLocalMicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props"并不总是正确的方法.

use "del %HOMEPATH%AppDataLocalMicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props" is not always the right way.

最好使用通常放置应用程序数据文件夹的del %USERPROFILE%AppDataLocalMicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props".

Better use "del %USERPROFILE%AppDataLocalMicrosoftMSBuildv4.0Microsoft.Cpp.Win32.user.props" where the application data folder is normally placed in.

然后我查看了 Microsoft.Cpp.x64.user.props 的内容,我看到 Visual Leaks Detector 添加了一些东西.说的有道理,一个月前,我用VLD做了内存泄漏分析.

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.

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

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

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

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