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: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
|