: Hi,
: I need some help with dlls. It's my first time writting dlls and I have a minor problem.
:
:
: #ifdef MYPROJ_EXPORTS
: #define _myprojExport __declspec(dllexport)
: #else
: #define _myprojExport __declspec(dllimport)
: #endif
:
: class _myprojExport MyClass
: {
: ...
: protected:
: typedef std::list<std::string> StringList;
: StringList mylist;
: };
:
:
: As you can see on the above code I have MyClass which is a simple class that I export. When mylist member is missing everything is compiled smoothly, however when I have mylist member variable on the class I get the following warning from my compiler (VS .NET 7.1).
:
: warning C4251: 'MyClass::mylist' : class 'std::list<_Ty>' needs to have dll-interface to be used by clients of class 'MyClass'
: with
: [
: _Ty=std::string
: ]
:
: How can I create a dll-interface for std::list? I don't have to export std::list the client will find its implementation in <list>. How should I declare mylist in order to get rid of these warnings?
:
: Thanks in advance,
: Themis
:
templates can't be exported -- but I think you can safely ignore the error if the application program will not have access to the template object.