Re: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-04-23 09:29:31
|
What version of CppUnit are you using ? TestPlugInDefaultImpl doesn't exist anymore. Try switching to 1.9.6, there has been a lot of clean up in the TestPlugIn stuff! Baptiste. ----- Original Message ----- From: "Philippe Lavoie" <phi...@ca...> To: "Philippe Lavoie" <phi...@ca...>; "Baptiste Lepilleur" <gai...@fr...>; <cpp...@li...> Sent: Tuesday, April 23, 2002 12:44 AM Subject: RE: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET I did a little bit more investigation, and if I use the following code in cppunitplugin.cpp (inside my ATL project). The following is just the define expanded. #include "stdafx.h" #include <cppunit/plugin/TestPlugIn.h> class CppUnitTestPlugInNamedDefaultImpl : public CppUnit::TestPlugInDefaultImpl virtual std::string getSuiteName() return "Acuraci"; } }; extern "C" __declspec(dllexport) CppUnitTestPlugIn* cppunitTestPlugIn(void) static CppUnitTestPlugInNamedDefaultImpl plugIn; return &plugIn; } I receive this instead... CppUnitPlugin.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CppUnit::TestPlugInDefaultImpl::uninitialize(void)" (?uninitialize@TestPlugInDefaultImpl@CppUnit@@UAEXXZ) CppUnitPlugin.obj : error LNK2001: unresolved external symbol "public: virtual class CppUnit::Test * __thiscall CppUnit::TestPlugInDefaultImpl::getTestSuite(void)" (?getTestSuite@TestPlugInDefaultImpl@CppUnit@@UAEPAVTest@2@XZ) CppUnitPlugin.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CppUnit::TestPlugInDefaultImpl::initialize(void)" (?initialize@TestPlugInDefaultImpl@CppUnit@@UAEXXZ) CppUnitPlugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CppUnit::TestPlugInDefaultImpl::TestPlugInDefaultImpl(void)" (__imp_??0TestPlugInDefaultImpl@CppUnit@@QAE@XZ) referenced in function "public: __thiscall CppUnitTestPlugInNamedDefaultImpl::CppUnitTestPlugInNamedDefaultImpl(void)" (??0CppUnitTestPlugInNamedDefaultImpl@@QAE@XZ) CppUnitPlugin.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CppUnit::TestPlugInDefaultImpl::~TestPlugInDefaultImpl(void)" (__imp_??1TestPlugInDefaultImpl@CppUnit@@UAE@XZ) referenced in function "public: virtual __thiscall CppUnitTestPlugInNamedDefaultImpl::~CppUnitTestPlugInNamedDefaultImpl(void)" (??1CppUnitTestPlugInNamedDefaultImpl@@UAE@XZ) It's not really an improvement but hopefully someone can help me get the latest version of cppunit to work with Visual .NET's C++ ATL projects. Phil > -----Original Message----- > From: Philippe Lavoie > Sent: Monday, April 22, 2002 6:24 PM > To: Baptiste Lepilleur; cpp...@li... > Subject: RE: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET > > > > Hi, > > I did a cvs update of cppunit and I can't get the testplugin > to work for my own project. Everything compiles fine inside > the examples .dsw. I can run them, life is good. > > I've defined CPPUNIT_DLL. Then, I added a cppunitplugin.cpp > file with the following content > > #include <cppunit/plugin/TestPlugIn.h> > > CPPUNIT_PLUGIN_IMPLEMENT(); > > // needed for an ATL project > // note that cppunit fails if stdafx.h is included before the macro. > #include "stdafx.h" > > > Finally, I link with cppunitd_dll.lib. It compiles... but it returns > > Failed to load test plug-in: > Symbol [cppunitTestPlugIn] not found in dynamic libary:Bob.dll > > > This is really weird as simple_plugin works like a charm and > I can't see what the missing option could be. > > Please help > > Phil > > > > > > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |