无法编译64位Visual Studio 2010项目

编程入门 行业动态 更新时间:2024-10-16 18:33:20
本文介绍了无法编译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项目

本文发布于:2023-11-11 05:43:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577541.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!