c******s 发帖数: 270 | 1 要被继承的类(DllObject)定义在Project A, 用DLL导出. 而子类(MyClass)定义在
Project B.
在Project A中, 我定义了宏MYDLL_BUILD.
// Config_Project_A.h
#if !defined(MYDLL_BUILD)
# pragma comment(lib, "myDll.lib")
#endif
#if defined(MYDLL_BUILD)
# define MYDLL_API __declspec(dllexport)
#else
# define MYDLL_API __declspec(dllimport)
#endif
// DllObject.h
class MYDLL_API DllObject
{
public:
virtual ~DllObject() {}
protected:
DllObject() { m_count = 3; }
priv... 阅读全帖 |
|