Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2004-12-02 10:22:32


I am afraid I do not have enough dll expirience to comment on this topic
right now. Does anybody have any idea?

Gennadiy

> I create main testsuit in .exe file. Other testsuits I
> placed into dll's. My test system doesn't work because
> static data different for objects test_suite that
> creating in exe and in dll.
>
> in exe:
> test_suite* init_unit_test_suite( int argc, char *
> argv[] ) {
> std::auto_ptr<test_suite> test( BOOST_TEST_SUITE(
> "ProjectV" ) );
> HMODULE HM = LoadLibrary("BugBoost");
> const INIT_DLL_TEST_SUITE InitDLLTestSuite =
> (INIT_DLL_TEST_SUITE)GetProcAddress(HM,"InitDLLTestSuite");
> test->add( InitDLLTestSuite() );
> return test.release();
> }
>
> in dll:
> struct TestDLLSuite : public UTSuite{
> TestXMLSuite() : UTSuite("TestDLL"){
> boost::shared_ptr<TestXML> instance( new TestDLL() );
> };
>
> extern "C" __declspec(dllexport) test_suite*
> InitDLLTestSuite(){
> return (new TestDLLSuite());
> }


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk