About inconsistent dll linkage

前端 未结 7 721
遥遥无期
遥遥无期 2020-12-29 01:25

How can I remove this link warning? You can see code segment that causes this warning.

static AFX_EXTENSION_MODULE GuiCtrlsDLL = { NULL, NULL };
//bla bla
//         


        
7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-29 02:07

    There are multiple possibilities:

    1) static AFX_EXTENSION_MODULE GuiCtrlsDLL = { NULL, NULL };

    You use AFX_EXTENSION_MODULE. This means that you are implementing an MFC extension DLL. For such extension dlls you have to define the preprocessor _AFXEXT. Set this in the C++ compiler settings of your Visual C++ project

    see:

    How To Use _declspec(dllexport) in an MFC Extension DLL: http://support.microsoft.com/kb/128199

    AFX_EXTENSION_MODULE Structure: http://msdn.microsoft.com/en-us/library/sxfyk0zk.aspx

    TN033: DLL Version of MFC: http://msdn.microsoft.com/en-us/library/hw85e4bb.aspx

    2) It is likely that you have a duplicated definiton/declaration.

提交回复
热议问题