有两个DLL:Dll_1和Dll_2。其中Dll_1中有一导出类CParent且类中用MESSAGE_MAP声明了消息响应函数;DLL_2中有一导出类CChild继承了Dll_1中的Parent类且Dll2中同样用MESSAGE_MAP宏声明了消息响应函数。编译DLL_2时即出现错误提示:
error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const  CParent::messageMap" (?messageMap@CParent@@1UAFX_MSGMAP@@B)
..\BIN/TestDll2.dll : fatal error LNK1120: 1 unresolved externals
另外,我试着用WindowProc接收消息,但CChild类对象收到消息后,CParent类也会收到消息,不知如何避免。
请高人指点迷津!