I'm trying to make my library exportable as a DLL but I'm getting a lot of these warnings for one specific class that uses std::vector:
template <typename T>
class AGUI_CORE_DECLSPEC AguiEvent {
typedef void (*AguiCallbackFptr)(T arg, AguiWidget* sender);
std::vector<AguiCallbackFptr> events;
public:
void call(AguiWidget* sender, T arg) const;
void addHandler(AguiCallbackFptr proc);
void removeHandler(AguiCallbackFptr proc);
void removeHandler();
AguiEvent();
};
I get warnings like these:
Warning 57 warning C4251:
'AguiEvent::events' : class
'std::vector<_Ty>' needs to have
dll-interface to be used by clients of
class 'AguiEvent'
I tried to find how to do this properly but MSDN's documentation is very Windows Only, and I need this to be cross platform so that it only does MS specific stuff when AGUI_CORE_DECLSPEC is in fact defined.
What should I do to get rid of these warnings?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…