When I try to play an audiofile, I get a console window, which just shows a lot of random characters. And after that a screen pops-up saying: console-aplication3 has stopped working. When i open the debugger I get this error: Unhandled exception at 0x6B37DC17 (vcruntime140.dll) in ConsoleApplication3.exe: 0xC0000005: Access violation reading location 0x00CE4000.
This is my code:
#include "stdafx.h"
#include <SFML/Audio.hpp>
int main()
{
sf::Music test;
if (!test.openFromFile("music.ogg"))
return -1; // error
test.play();
}
anybody knows what goes wrong?