本地C ++解决方案VS2008的升级-> VS2010-重建解决方案失败,但构建解决方案成功 [英] Upgrade of Native C++ solution VS2008 -> VS2010 - rebuild solution fails, but build solution succeeds

查看:84
本文介绍了本地C ++解决方案VS2008的升级-> VS2010-重建解决方案失败,但构建解决方案成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VS2008本机C ++解决方案,其中包含4个项目,3个可执行文件和1个依赖于可执行文件的dll.转换为VS 2010后,当我构建(重建解决方案)解决方案时,输出窗口将指示dll和导入 库已构建,但磁盘上没有输出. 3个从属项目无法链接,因为它们找不到导入库.如果我通过Buid解决方案进行构建,那么即使构建全部以干净解决方案"为前提,它也可以正常工作.所以本质上是 与重建解决方案相同.

I have a VS2008 native C++ solution with 4 projects, 3 executables and 1 dll on which the executables are dependant. After the conversion to VS 2010, when I built (Rebuild Solution) the solution, the output window indicates that the dll and import library were built, but there is no output on disk. The 3 dependant project fail to link because they can not find the import lib. If I build (via Buid solution) it works, even if the build all is preceeded by "clean solution" so that it is essentially the same as a rebuild solution.

在转换过程中,每个项目都有以下警告,这可能是相关的(我不明白我应该解决的问题,这两个问题是哪个属性表,每个配置都有2个属性表,即"Microsoft.Cpp.平台.用户"和 从VC 7.1升级")升级警告是针对每个配置/平台重复的

During the conversion each project had the following warning, which is perhaps related (I don't understand what I should be fixing, which property sheets of the two are the problem, each config has 2 property sheets, which are "Microsoft.Cpp.<platform>.user" and "Upgrade from VC 7.1") The upgrade warning, which is repeated for each config/platform, is

下面为配置"Debug | Win32"报告的所有用户宏均在其定义之前使用,这可能会导致不良的生成结果;此版本不支持此功能.您可以通过更改使用属性的包含顺序来解决此问题 表并确保它们位于定义用户宏的属性表之后.
MSB4211:C:\ Program Files(x86)\ MSBuild \ Microsoft.Cpp \ v4.0 \ Microsoft.CppCommon.targets(36,5);属性"TargetPath"首次设置为一个值,但已在"D:\ tt-dev \ PerformanceLogger \ misc \ performance_logger \ 3.0 \ dev \ self_measurement \ self_measurement_vc90.vcxproj"处使用.

All user macros reported below for configuration 'Debug|Win32' are used before their definition, which can cause undesirable build results; this is not supported in this release. You can resolve this by changing the inclusion order of the consuming property sheets and making sure they come after the property sheets defining the user macros.
MSB4211: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets (36,5); The property "TargetPath" is being set to a value for the first time, but it was already consumed at "D:\tt-dev\PerformanceLogger\misc\performance_logger\3.0\dev\self_measurement\self_measurement_vc90.vcxproj".

我试图反转2个属性表的顺序,但这似乎没有什么不同.

I have tried inverting the order of the 2 property sheets, but that doesn't seem to make a difference.

推荐答案

嗨莱斯利,

>输出窗口指示dll和导入库已构建,但磁盘上没有输出.

您是说VS在构建项目时不会引发错误吗?您是否看到[项目名称] .vcxproj-> VS输出窗口中的[生成文件的路径]?我注意到该选项 启用增量链接"设置为是"默认.但是在VS 2010中,它设置为否";默认.如果将项目从VS 2008转换为VS 2010,则设置可能仍为是".当我改变那个 我的测试项目的选项为是"在VS 2010中.执行发行版本时,在输出窗口中看到LINK警告.您能检查一下这个选项吗?它在磁盘上什么也不产生什么意思?

Do you mean VS doesn’t raise error when building your project? Do you see [Project Name].vcxproj -> [Path of generated file] in the VS output window? I notice the option of “Enable Incremental Linking” is set to “Yes” by default. But in VS 2010, it is set to “No” by default. If you convert the project from VS 2008 to VS 2010, the setting may remains “Yes”. When I change that option for my test project to “Yes” in VS 2010. I saw LINK warning in output window when perform a release build. Could you please check that option? And what does it produce nothing on the disk mean?

此致,

张倩倩

在论坛中


这篇关于本地C ++解决方案VS2008的升级-&gt; VS2010-重建解决方案失败,但构建解决方案成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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