samedi 6 décembre 2014

C++ - LNK2001 error altough I have done everything correctly


Vote count:

0




I wanted to try myself on a little C++ application, but I all the time get the LNK2001 error and I have no idea what I am doing wrong.


Can someone please help me out?



#ifndef CONTENTMANAGER_H
#define CONTENTMANAGER_H

#include "SFML\Graphics.hpp"
#include <map>
#include <sstream>

using namespace sf;
using namespace std;


static class CONTENTMANAGER
{
public:
static Texture getTexture(string textureName)
{
if(textureMap.find(textureName) == textureMap.end())
{

Texture texture;
stringstream ss;
ss<<"Texture"<<textureName<<".png";
texture.loadFromFile(ss.str());
textureMap.emplace(textureName, texture);
return textureMap[textureName];

}
else
{
return textureMap[textureName];
}
}

private:
static map<string,Texture> textureMap;
};




#endif


asked 1 min ago







C++ - LNK2001 error altough I have done everything correctly

Aucun commentaire:

Enregistrer un commentaire