Re: [Cppunit-devel] Using mfc in a DllPlugin success
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-06-21 11:31:51
|
----- Original Message ----- From: "Magnus Sirwiö" <si...@ho...> To: <cpp...@li...> Sent: Thursday, June 20, 2002 1:16 AM Subject: [Cppunit-devel] Using mfc in a DllPlugin success > Hi, > > Thank you so much for the hints. Its now working with some minor project > modifications. > > First of all I created a mfc dll appwizard project to get all defines and > linker options right. > Next thing was to include the following lines into the main DLL source file > (generated by the wizard) > > #include <cppunit/plugin/TestPlugIn.h> > CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); > > Note that the plugin macro has to be included after the stdafx.h include but > before the THIS_FILE define stuff! What happen if you put it after ? I gave it a quick look and it should cause any problems... > Add the usual CPPUNIT_DLL define to the project defines and link with the > cppunitd_dll.lib/cppunit_dll.lib libraries. > > Works perfectly with the TestPlugInRunner. (So far since I haven't tested it > that extensibly yet > > In order to get it to work with the DllPlugInTester I had to build a special > target with Use MFC in a Shared DLL. I suggest that such a target get added > to the DllPluginTester.dsp project. What it the only thing you need to do ? Did you need to add a CWinApp object to the source file (MFC use AfxGetApp() a lot) Glad to see there is no major issue, though. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French. |