VS2008项目仅在x64目标中编译1个C ++文件

时间:2011-09-29 16:43:15

标签: visual-studio-2008 visual-c++ compilation 64-bit

这很奇怪,因为它主要编译好一切,但这个项目(主要的DLL项目,链接在许多库项目中)只是拒绝。它只编译CK20_Test.cpp,然后继续链接。如果我排除那个,它只编译DebugInfo.cpp和链接。等等。

如果我切换到Win32目标,它编译所有罚款。

Microsoft Visual Studio 2008 版本9.0.21022.8 RTM, Microsoft .NET Framework, 版本3.5 SP1, Microsoft Visual C ++ 2008 91605-130-0691883-60531

并安装了一堆标准修补程序。

1>------ Rebuild All started: Project: XMD, Configuration: DebugR x64 ------
1>Deleting intermediate and output files for project 'XMD', configuration 'DebugR|x64'
1>Compiling...
1>stdafx.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>LINK : D:\prj\alpha\64\shared\x64\DebugR\XMDCore.dll not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Build log was saved at "file://d:\prj\alpha\64\shared\xmd\x64\DebugR\BuildLog.htm"
1>XMD - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========

编辑:配置另一台计算机。同样的问题。我觉得必须打破项目文件(请参阅下面关于内容的评论),否则编译器会搞砸。但我无法想象我会做些什么来破坏它。

1 个答案:

答案 0 :(得分:0)

问题解决了! C ++输出文件对象文件名设置(/ Fo)是$(IntDir)。

当我在x64中编译时,程序生成了DebugR.obj。 在Win32编译器中,相同的设置生成了DebugR \ $(InputName).obj。

同样适用于发布或调试配置。

解决方案:将$(IntDir)更改为$(IntDir)\

相关问题