c++ - VS 2010 中的 CPP 单元构建错误

标签 c++ visual-studio-2010

我正在使用 VS 2010 构建 CPPunit 1.12.1。我能够在 VS 2008 上成功构建 CPP 单元。我只构建 CPPUnit 库。 我收到以下错误。我该如何修复此错误。

error MSB3073: The command "copy "D:\src\cppunit\.\Debug\cppunit.lib" ..\..\lib\cppunit.lib
:VCEnd" exited with code 1. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets 113 6   cppunit

I am also mentioning one of warnings which is related to error i think so.


C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1151,5): warning MSB8012: TargetPath(D:\src\cppunit\.\Debug\cppunit.lib) does not match the Library's OutputFile property value (D:\src\cppunit\Debug\cppunitd.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).

最佳答案

这些是构建后事件错误。

在 Visual Studio 解决方案资源管理器中右键单击您的项目名称:

属性 >> 构建后事件

如果您不想要构建后事件,请从命令行文本框中删除文本。或者修改路径!

关于c++ - VS 2010 中的 CPP 单元构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5422081/

相关文章:

c++ - 在 C++ 中使用 std::begin(collection) 与 collection.begin()

c++ - 使用WIC(Windows镜像组件)时遇到的问题

c++ - 如何初始化结构内的对 vector ?

c++ - 如何使用 tensorflow c++ API 导入元图?

c++ - 将 dll 添加到项目并使功能正常工作

c++ - 为 Prim 在 c++ 中的实现设计数据结构

c++ - 使用 freeglut/glew 在 VS2010 中设置 OpenGL 项目

visual-studio-2010 - 无法使用针对x64的VC++/VS2010进行编译:LNK1158:无法运行cvtres.exe

c# - 切换到 VS 2012,现在窗体不能正确调整大小?

c++ - 调整VS2010和VS6编译器和链接器开关以进行旧式构建