程序运行环境:
VC++6.0en , Windows XP
1、首先下载cppunit,下载地址http://sourceforge.net/project/downloading.php?groupname=cppunit&filename=cppunit-1.10.2.tar.gz&use_mirror=nchc
2、解压文件到本地文件夹,如“E:/cpp/cppunit-1.12.0”,下文中用“$cppuit”代替“E:/cpp/cppunit-1.12.0”。用VC++打开“E:/cpp/cppunit-1.12.0/src/CppUnitLibraries.dsw”,打开VC++的“build->batch build...”,在“batch build”对话框中,选择所有的工程,然后按“build”按钮。
3、在$cppuit/lib中可查看结果。
4、配置:
(1)、tools-〉Options-〉(tab)derectories,添加Include files:"$cppunit/include",Library files:"$cppunit/lib" Source files:"$cppunit/src/cppunti"。
(2)、选择Project->settings,选择Link tab,“Object Library Models”添加cppunitd.lib for settings win32 Debug,添加cppunit.lib for settings win32 release。
-
(3)、tab C++,选择Code generation, 设置Multithreaded DLL for the release configuration,选择Debug Multithreaded DLL for the debug configure。
-
(4)、tab C++,选择C++ langage,All Configurations,选上enable Run-Time Type Information (RTTI)
介绍cppunit环境搭建的相关文章:
http://hi.baidu.com/lzyu/blog/item/1bb8f2c44e920ea88326ac1f.html