2011-09-29 85 views
0

这很奇怪,因为大部分编译都很好,但是这个项目(主要DLL项目,链接到许多库项目中)只是拒绝。它只编译CK20_Test.cpp,然后继续链接。如果我排除那个,它只编译DebugInfo.cpp和链接。等等。VS2008项目只编译x64目标中的1个C++文件

如果我切换到Win32目标,它会编译一切正常。

微软的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 ========== 

编辑:配置另一台计算机。同样的问题。我觉得项目文件必须被破坏(请参阅下面关于内容的评论),否则编译器会混乱。但我无法想象我会如何解决它。

+0

您可以发布您的构建控制台输出?或者你的构建日志? –

+0

重建(仅限项目)日志。 –

+1

你说它编译CK20_Test.cpp,但我没有看到它在构建日志中... –

回答

0

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

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

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

解决方法:更改$(IntDir)到$(IntDir)\