参考资料:
http://blog.csdn.net/yysdsyl/archive/2008/07/08/2626033.aspx
用来生成dll的文件:
Test.h
class Test
{
public:
Test(void);
public:
virtual ~Test(void);
public:
virtual void DoSth()=0;
};
--------------------------------------------
///TTest.h
/TTest继承自Test
class TTest :
public Test
{
public:
TTest(void);
public:
~TTest(void);
public:
virtual void DoSth(){std::cout<<"TTest:do sth/n";};
};
///关键
extern "C" __declspec(dllexport) Test* CreateTTestPtr();
extern "C" __declspec(dllexport) void DeleteTTestPtr(Test* t);
--------------------------------------------------