VS2008 project only compiles 1 C++ file in x64 target
This is very 开发者_如何转开发strange, as mostly it compiles everything well, but this one project (the main DLL project, which links in many library projects) just refuses. It compiles only CK20_Test.cpp, then proceeds to link. If I exclude that one, it compiles only DebugInfo.cpp and links. Et cetera.
If I switch to Win32 target, it compiles all fine.
Microsoft Visual Studio 2008 Version 9.0.21022.8 RTM, Microsoft .NET Framework, Version 3.5 SP1, Microsoft Visual C++ 2008 91605-130-0691883-60531
and a bunch of standard hotfixes installed.
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 ==========
Edit: configured another computer. Same problem. I feel like the project file must be broken (see my comment below on content), or the compiler is messed up. But I can't imagine what I would do to unbreak it.
Problem solved! The C++ Output Files Object File Name setting (/Fo) was $(IntDir).
When I compile in x64, the program generated DebugR.obj. In Win32 compilers, the same setting produced DebugR\$(InputName).obj.
Likewise for Release or Debug configuration.
Solution: Change $(IntDir) to $(IntDir)\
精彩评论