[Cppunit-devel] Statically linking cppunit & testrunner.
Brought to you by:
blep
From: Malcolm N. <mn...@si...> - 2004-12-17 10:50:58
|
Greetings, =20 Due to numerous reasons (specifically trying to generate VC6 and VC7 = test programs, and a customer requirement of no DLLs), I have been = forced to produce a static MFC version of testrunner.lib. =20 The only problem I encountered was with = include\cppunit\ui\mfc\MfcTestRunner.h: =20 <---BEGIN class AFX_EXT_CLASS MfcTestRunner END---> =20 Obviously the AFX_EXT_CLASS tries to specify either a dllimport or = dllexport. Would it be possible to create a new define, say = TESTRUNNER_STATIC_MFC, and modify the file to: =20 <---BEGIN // Pick AFX_EXT_CLASS if being compiled as a DLL. #ifdef TESTRUNNER_STATIC_MFC #define CPPUNIT_EXT_CLASS #else //TESTRUNNER_STATIC_MFC #define CPPUNIT_EXT_CLASS AFX_EXT_CLASS #endif //TESTRUNNER_STATIC_MFC =20 class CPPUNIT_EXT_CLASS MfcTestRunner END---> =20 -Malcolm =20 P.S. I apologize if this isn't the correct location to make code/feature = requests. =20 |