STL container over DLL Export
-
Hi, I try to DLLExport a C++ class that contains an STL container, which gives a a compiler warning. I have "half of an idea" about the why, but it's a bit fuzzy. I recently found a MSKB article describing what to do in this case - however, I cannot find it anymore. Any suggestions?
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygen -
Hi, I try to DLLExport a C++ class that contains an STL container, which gives a a compiler warning. I have "half of an idea" about the why, but it's a bit fuzzy. I recently found a MSKB article describing what to do in this case - however, I cannot find it anymore. Any suggestions?
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist || Agile Programming | doxygenI presume you're talking about warning 4251. "If your project declares a class class __declspec(dllexport), and that class has members of the std::* type, you see C4251 warnings. Because all your code is built with the std::* class now statically linked, you can ignore these warnings. To explicitly disable those warnings, use the following notation: #pragma warning(disable: 4251)" This is what I do, and I've never had any problems with it. Hope it'll help you as well.