T
thomas
Hi,
Hmm. seems a little silly..
Here comes the puzzle.
-----dll------------
class TestAdd
{
public:
void TestNormal();
virtual void TestVirtual();
}
extern "C" TestAdd* TestAddCreate(){
return new(std::nothrow) TestAdd();
}
------------------
Above is part of the dll class. The implementation part is missed
deliberately.
TestAdd* instance = TestAddCreate();
When I call "instance->TestNormal()", it says
------message-----
error LNK2019: unresolved external symbol "public: void __thiscall
TestAdd::TestNormal(void)" (?TestNormal@TestAdd@@QAEXXZ) referenced in
function _main
-----message-----
But "instance->TestVirtual()" works.
I didn't learn "only virtual method can be called outside the dll". Am
I missing something? Thanks.
Tom..
Hmm. seems a little silly..
Here comes the puzzle.
-----dll------------
class TestAdd
{
public:
void TestNormal();
virtual void TestVirtual();
}
extern "C" TestAdd* TestAddCreate(){
return new(std::nothrow) TestAdd();
}
------------------
Above is part of the dll class. The implementation part is missed
deliberately.
TestAdd* instance = TestAddCreate();
When I call "instance->TestNormal()", it says
------message-----
error LNK2019: unresolved external symbol "public: void __thiscall
TestAdd::TestNormal(void)" (?TestNormal@TestAdd@@QAEXXZ) referenced in
function _main
-----message-----
But "instance->TestVirtual()" works.
I didn't learn "only virtual method can be called outside the dll". Am
I missing something? Thanks.
Tom..