Please help.
I succeeded to create my static library with the new Visual Studio, and it's compiling.
I also created a test program that will use it. I have three classes int he library.
The first one is stand alone, and when I include it I can use it.
But the second is base for the third, and is abstract with pure virtual functions.
Here they are :
1 2 3 4 5 6 7
|
class Base
{
public:
virtual ~Base() = 0;
virtual void testFunction() = 0;
};
|
// .h
1 2 3 4 5 6 7 8
|
class Derived: public Base
{
public:
Derived();
~Derived();
void testFunction() {}
};
|
// .cpp
1 2 3 4 5 6 7 8
|
class Derived: public Base
{
public:
Derived();
~Derived();
void testFunction() {}
};
|
1 2 3 4 5 6 7 8 9 10 11
|
#include "derived.h"
Derived::Derived() : Base()
{
}
void Derived::testFunction()
{
}
|
So, the library as I said is compiling, but when I try to compile my test project (which uses the library) and actually try to instantiate a Derived object ( new Derived() ), this damn error is occurring :
2>mylib.lib(derived.obj) : error LNK2019: unresolved external symbol "public: virtual __thiscall Base::~Base(void)" (??1Base@@UAE@XZ) referenced in function __unwindfunclet$??0Circle@@AAE@XZ$0
2>C:\Documents and Settings\Secret\Desktop\visualStudioWorkspace\MyLibrary\Debug\TestProgram.exe : fatal error LNK1120: 1 unresolved externals