I'm currently working on a DLL which uses std::map container and TR1::Function. Somehow however, I get loads of errors when i try to compile it.
It basically looks like
#include <map>
#include <functional>
class __declspec(dllexport) Game : public Singleton<Game>
{
private:
std::map<int, std::tr1::function<void (void)>> HandleMap;
public:
Game()
{
HandleMap[QUESTCOMPLETE] = std::tr1::bind(&MyGame::Game::OnAddMoney, this, std::tr1::placeholders::_1);
//....
}
}
So. when i try to compile this, first of all i get the warning C4251 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' for the std::map declaration.
An then load of errors in the xxresult file, which obviously I have to cause somehow. Does anyone have an idea why?
Xaser