Thread: RE: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET
Brought to you by:
blep
From: Philippe L. <phi...@ca...> - 2002-04-22 22:23:50
|
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" =20 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 |
From: Philippe L. <phi...@ca...> - 2002-04-22 22:44:16
|
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.=20 #include "stdafx.h" #include <cppunit/plugin/TestPlugIn.h> class CppUnitTestPlugInNamedDefaultImpl : public = CppUnit::TestPlugInDefaultImpl { = =20 virtual std::string getSuiteName() = =20 { = =20 return "Acuraci"; = =20 } = =20 }; extern "C" __declspec(dllexport) CppUnitTestPlugIn* = cppunitTestPlugIn(void) { = =20 static CppUnitTestPlugInNamedDefaultImpl plugIn; = =20 return &plugIn; = =20 } =20 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(voi= d)" (??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=20 > 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 >=20 >=20 >=20 > Hi, >=20 > I did a cvs update of cppunit and I can't get the testplugin=20 > to work for my own project. Everything compiles fine inside=20 > the examples .dsw. I can run them, life is good. >=20 > I've defined CPPUNIT_DLL. Then, I added a cppunitplugin.cpp=20 > file with the following content >=20 > #include <cppunit/plugin/TestPlugIn.h> >=20 > CPPUNIT_PLUGIN_IMPLEMENT(); >=20 > // needed for an ATL project > // note that cppunit fails if stdafx.h is included before the macro. > #include "stdafx.h" =20 >=20 >=20 > Finally, I link with cppunitd_dll.lib. It compiles... but it returns >=20 > Failed to load test plug-in: > Symbol [cppunitTestPlugIn] not found in dynamic libary:Bob.dll >=20 >=20 > This is really weird as simple_plugin works like a charm and=20 > I can't see what the missing option could be. >=20 > Please help >=20 > Phil >=20 >=20 >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel >=20 |
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 > |
From: Philippe L. <phi...@ca...> - 2002-04-22 22:54:33
|
Never mind... I had a bad version of the Include files...=20 Sigh... spent the whole afternoon on this... Stupid copy doesn't work = when the file is in use... Stupid stupid stupid. Phil > -----Original Message----- > From: Philippe Lavoie=20 > 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 >=20 >=20 >=20 > Hi, >=20 > I did a cvs update of cppunit and I can't get the testplugin=20 > to work for my own project. Everything compiles fine inside=20 > the examples .dsw. I can run them, life is good. >=20 > I've defined CPPUNIT_DLL. Then, I added a cppunitplugin.cpp=20 > file with the following content >=20 > #include <cppunit/plugin/TestPlugIn.h> >=20 > CPPUNIT_PLUGIN_IMPLEMENT(); >=20 > // needed for an ATL project > // note that cppunit fails if stdafx.h is included before the macro. > #include "stdafx.h" =20 >=20 >=20 > Finally, I link with cppunitd_dll.lib. It compiles... but it returns >=20 > Failed to load test plug-in: > Symbol [cppunitTestPlugIn] not found in dynamic libary:Bob.dll >=20 >=20 > This is really weird as simple_plugin works like a charm and=20 > I can't see what the missing option could be. >=20 > Please help >=20 > Phil >=20 >=20 >=20 >=20 >=20 >=20 >=20 > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel >=20 |
From: Baptiste L. <gai...@fr...> - 2002-04-23 09:30:57
|
Could you still specify the trouble you add with stdafx.h. Thanks, 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:54 AM Subject: RE: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET Never mind... I had a bad version of the Include files... Sigh... spent the whole afternoon on this... Stupid copy doesn't work when the file is in use... Stupid stupid stupid. 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 > |
From: Philippe L. <phi...@ca...> - 2002-04-23 13:24:37
|
It seems that the .h that came with 1.9.2 had an issue with stdafx.h. I did more tests this morning with the cvs version, and everything is = fine. I can put the stdafx.h before or after the include and everything = works as it's suppose to. Sorry if I gave you a scare :) Phil PS Maybe all the .h could have a version label in them so that I could = see really easyilly that I'm looking at the wrong .h :) > -----Original Message----- > From: Baptiste Lepilleur [mailto:gai...@fr...] > Sent: Tuesday, April 23, 2002 5:38 AM > To: cpp...@li... > Subject: Re: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET >=20 >=20 > Could you still specify the trouble you add with stdafx.h. >=20 > Thanks, > Baptiste. >=20 > ----- Original Message ----- > From: "Philippe Lavoie" <phi...@ca...> > To: "Philippe Lavoie" <phi...@ca...>; "Baptiste=20 > Lepilleur" > <gai...@fr...>; <cpp...@li...> > Sent: Tuesday, April 23, 2002 12:54 AM > Subject: RE: [Cppunit-devel] CppUnit 1.9.6 tar ball -- Visual .NET >=20 >=20 > Never mind... I had a bad version of the Include files... >=20 > Sigh... spent the whole afternoon on this... Stupid copy=20 > doesn't work when > the file is in use... Stupid stupid stupid. >=20 >=20 |
From: Baptiste L. <gai...@fr...> - 2002-04-23 09:29:17
|
Could you specify the failure you get when you include stdafx.h before (windows.h is not supposed to be included if it has already been included) ? Also, try putting all your dll (cppunitd.dll, dllplugintester.exe, bob.dll) in the same directory to run it. Baptiste. ----- Original Message ----- From: "Philippe Lavoie" <phi...@ca...> To: "Baptiste Lepilleur" <gai...@fr...>; <cpp...@li...> Sent: Tuesday, April 23, 2002 12:23 AM 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 |