我需要学习如何对使用client 1.12.1的客户端使用和操作旧版本。但是,当我试图从SourceForge获取副本时,CPPUnit 1.12.1版本似乎不包含库文件。库文件夹中没有库文件!我认为这应该是因为我在Visual 2010中使用CppUnit,而且所有必要的语法都是不可识别的。
另外,我想知道如何将Cpp 1.12.1与Visual 2010连接起来。也就是说,如何将它添加为引用或导入库,以便Visual检测到我正在使用它?
想在窗户上做这一切。
编辑:当我尝试在调试中构建cppunit解决方案时,我会收到一个与此类似的错误。我尝试将outdir设置为该帖子中提供的相同命令,但没有帮助。但是,它可能与将VS 6文件转换为VS 10有关。
然而,我也收到了以下警告:
Warning 1 warning MSB8012: TargetPath(C:\Users\~\Downloads\cppunit-1.12.1.tar\cppunit-1.12.1\cppunit-1.12.1\src\cppunit\.\Debug\cppunit.lib) does not match the Library's OutputFile property value (C:\Users\~\Downloads\cppunit-1.12.1.tar\cppunit-1.12.1\cppunit-1.12.1\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). C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets 1151 6 cppunit
Warning 2 warning MSB8012: TargetName(cppunit) does not match the Library's OutputFile property value (cppunitd). 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). C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets 1153 6 cppunit发布于 2013-11-20 15:18:32
有一个Visual 2010可构建版本的这里,以及一些示例用法和说明。
希望这有帮助,但是如果你需要更多的信息,请告诉我,我会挖出一些:)
增编:
我无法复制错误MSB3073,解决方案可以很好地构建所有项目。
我已经从我的网站的CPP 1.12.1项目上传了一组编译好的文件,以防您迫切需要它们。下面是一些有希望解决问题的说明。
最常见的MSB3073是与构建后事件相关的,因此您可以:
Whis应该修复它,或者尝试与我设置的属性相匹配(请记住,您可能会设置这些属性,以便发布和调试,以及x86和x64,这取决于给您带来问题的变量)。
供参考
我在这里包含了我的设置,因为它们在CPP单元的默认设置中:
CPP单元项目

CPP单元DLL项目

DLL PlugIn测试器

测试PlugIn Runner

试验转轮

使用创建的DLL或lib文件:
只需将dll和lib所在的目录添加到下面所示的附加库参数:

在此之后,要启用dll或lib中的功能,所需做的就是#包含标头,这应该是最好的选择。
希望这能解决你的问题,如果不让我知道的话:)
https://stackoverflow.com/questions/20099277
复制相似问题