我正在使用 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/