Download and compile cppunit:
1.download the latest version of cppunit-1.12.1.tar.gz (web site is http://sourceforge.net/apps/mediawiki/cppunit/index.php? Title = main_page # download );
2. extract, enter the cppunit-1.12.1/src directory, is the source code, open cppunitlibraries. DSW project, use vs2008 to convert to cppunitlibraries. SLN: Delete the dsplugin project under the solution, and modify msdevcallerlistctrl under the userinterface under the testrunner project. change the 67th line of the CPP file to "# import" Libid: 80cc9f66-e7d8-4ddd-85b6-d9e6cd0e93e2 "version (" 8.0 ") lcid (" 0 ") raw_interfaces_only named_guids ";
3. Build solution. The generated file is automatically copied to the Lib of the parent directory. A total of seven files are available except the one in the original directory (both Debug and release are supported, and the default value is Debug)
Set to vs2008
Add the cppunit-1.12.1/include to the options tab in vs to add the cppunit-1.12.1/lib to the library file, and add the lib to the environment variable, so that you do not have to copy the DLL file.