Okay it's been a while since I've been programming but I'm back and I'm suffering from the same error. The thing is, when I use a static image or sprite variable, the program crashes and the "Lock.cpp" file is shown in Visual studio and the debugger points to
Lock::Lock(Mutex& mutex) :
myMutex(mutex)
{
myMutex.Lock();
}
The program does not crash under release mode, ONLY debug. I am linking statically. Here is the code:
//example.hpp
#ifndef EXAMPLE_HPP_
#define EXAMPLE_HPP_
#include <SFML\Graphics.hpp>
class Example
{
static sf::Image image;
static sf::Sprite sprite;
};
#endif
//example.cpp
#include "example.hpp"
sf::Image Example::image;
sf::Sprite Example::sprite;
//main.cpp
#include <iostream>
int main()
{
}
Any advice is appreciated.