I've created a patch to CppUnit 1.5.5 which allows it to be built as a
.DLL in MSVC6. This can be found at:
http://www.wpi.edu/~davidl/cppunit-1.5.5_msvc-dll.tar.bz2
To apply the patch, you'll need a copy of CygWin. Then use the following
commands:
* tar xvzf cppunit-1.5.5.tar.gz
* bzip2 -dc cppunit-1.5.5_msvc-dll.tar.bz2 | tar xvf -
* patch -p0 < cppunit-1.5.5_msvc-dll.diff
* cp cppunitdll.dsp cppunit-1.5.5/src/cppunit
To use this:
* Include cppunitdll.dsp in an MSVC6 workspace.
* Link to cppunitdll.lib, which will be located in cppunit-1.5.5/lib
* Make sure that CPPUNIT_DLL is defined either via the command line or
before any CppUnit header files are included.
Using CppUnit as a DLL fixes some bugs when trying to use CppUnit across
many different .DLLs. In my case, I wanted to use CppUnit in a project
consisting of many different plugins, each of which would have test cases
compiled into them. Linking CppUnit statically into each of these files
caused numerous problems. Building CppUnit as a .DLL fixed these.
--
David Ludwig | "The Linux philosophy is laugh in the face of
davidl<at>wpi.edu | danger. Oops. Wrong One. 'Do it yourself.'
http://www.wpi.edu/~davidl | That's it." - Linus Torvalds
|