----- Original Message -----
From: "Magnus Sirwiö" <si...@ho...>
To: <cpp...@li...>
Sent: Tuesday, June 18, 2002 10:40 PM
Subject: [Cppunit-devel] Is using mfc in a DllPlugin possible (CppUnit
1.9.8)?
> Hi,
>
> Having trouble compiling my DllPlugin when using mfc. The compiler
complains
> about DllMain already beeing defined.
That's because the 'default' macro implement DllMain. Use the following
macro instead:
CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl );
This will exports the needed function, but will not implement DllMain.
> My testcase works like a charm without mfc.
> Changing the project settings to "Use MFC in a Shared Dll" and including
> <afx.h> in my testcase source file makes the compiler barf at me!
You may want to start your project using the Wizard. I'm not sure what the
spefic are, but you probably need to define some symbols to indicate that
your project use MFC DLL and is a DLL (MFC TestRunner generate a MFC DLL
that use CppUnit DLL, so this is not a CppUnit issue).
Notes that to run the DLL, you will need to use the MFC plug-in test runner
since DllPlugInTester is not an MFC application (though the change should be
very easy to do, just start with a MFC console app)
Please, keep us posted on your progress (I haven't try doing that, and I'm
curious about the result)
Baptiste.
---
Baptiste Lepilleur <gai...@fr...>
http://gaiacrtn.free.fr/
|