im trying to load and image and convert it to a sprite inside a class by using some kind of image management here is the code.
class Submarine:public sf::Sprite
{
private:
short int energy;
sf::Sprite subSprite;
static sf::Image submarine;
public:
Submarine()
{
subSprite.SetImage(submarine);
cout<<"Sprite created";
initSprite("images/submarine.png");
}
static bool initSprite(const string& Imagefile)
{
return submarine.LoadFromFile(Imagefile);
};
};
error is LNK2001: unresolved external symbol "private: static class sf::Image Submarine::submarine" (?submarine@Submarine@@0VImage@sf@@A)
of corse the header files are there