Warning C4275 non dll-interface class
-
We use a lib and a dll to store our shared dialogs. At compile time we get the following warning: i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog' This warning seems to be really just a warning (We cant find any real problems... ...but... ...a warning is a warning. Does anyone knows how to get rid of this? This is how we declare our class: class LIB_EXPORT ErrDlg : public CDialog where LIB_EXPORT is: #ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL #define LIB_EXPORT AFX_EXT_CLASS #else #define LIB_EXPORT __declspec( dllexport ) #endif #else // UNIX #define LIB_EXPORT #endif
-
We use a lib and a dll to store our shared dialogs. At compile time we get the following warning: i:\eldis3\bib_source\eurodialoge\errdlg.h(19) : warning C4275: non dll-interface class 'CDialog' used as base for dll-interface class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afxwin.h(2568) : see declaration of 'CDialog' This warning seems to be really just a warning (We cant find any real problems... ...but... ...a warning is a warning. Does anyone knows how to get rid of this? This is how we declare our class: class LIB_EXPORT ErrDlg : public CDialog where LIB_EXPORT is: #ifdef _AFXDLL // Sonderfall MFC-Klassen in DLL #define LIB_EXPORT AFX_EXT_CLASS #else #define LIB_EXPORT __declspec( dllexport ) #endif #else // UNIX #define LIB_EXPORT #endif
-
Hi seems to me that you are using MFC staticaly linked, so CDialog isn't in a DLL but in the lib. Guess youget rid of that warning when you use MFC as a shared DLL.