class '...all MFC classes...' needs to have dll-interface to be used by clients of class 'ErrDlg'
-
i:\eldis3\bib_source\eurodialoge\errdlg.h(47) : warning C4251: 'm_text' : class 'CString' needs to have dll-interface to be used by clients of class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Since I use a lot of lib's (dll's) I get this warning for nearly everything I am exporting. I can't see any problems with this warning (There are (I hope so) no problems at runtime) but I want to get rid of these endless warnings at compile time. Does anyone know from where these warnings are coming? Does anyone know how to get rid of these warnings? Thank you...
-
i:\eldis3\bib_source\eurodialoge\errdlg.h(47) : warning C4251: 'm_text' : class 'CString' needs to have dll-interface to be used by clients of class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Since I use a lot of lib's (dll's) I get this warning for nearly everything I am exporting. I can't see any problems with this warning (There are (I hope so) no problems at runtime) but I want to get rid of these endless warnings at compile time. Does anyone know from where these warnings are coming? Does anyone know how to get rid of these warnings? Thank you...
Well, you could use #pragma warning(disable:4251) But I think this is a warning based upon some other problem you are not diagnosing. My suspicion is that you might have some of your DLL statically linked to MFC and some are dynamically linked. Good luck! I was just at a location where they had mixed and matched them with VC 5.0, and wow! did things really go crazy when the VC 6.0 was first used. Had to go through all modules of all related projects and settle on one type or another.
-
i:\eldis3\bib_source\eurodialoge\errdlg.h(47) : warning C4251: 'm_text' : class 'CString' needs to have dll-interface to be used by clients of class 'ErrDlg' c:\programme\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString' Since I use a lot of lib's (dll's) I get this warning for nearly everything I am exporting. I can't see any problems with this warning (There are (I hope so) no problems at runtime) but I want to get rid of these endless warnings at compile time. Does anyone know from where these warnings are coming? Does anyone know how to get rid of these warnings? Thank you...
In the header file for each class in your DLL, specify AFX_EXT_CLASS just before the name of the class and then the whole class will be exported. ie. class AFX_EXT_CLASS CErrorDialog : public CDialog { //.. }; and then remove any and all export stuff you have anywhere else for that class. Brian