I have been building a game using SFML in c++ on windows. I have now finished the game and I have been trying to create a GUI using TGUI because it looked simple and easy to use. I have set it up in my VC++ project and compiled a seemingly simple piece of code.
#include <SFML/Window.hpp>
#include <TGUI/TGUI.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
tgui::Gui gui(window);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
gui.handleEvent(event);
}
window.clear();
gui.draw();
window.display();
}
return 0;
}
The code compiles fine, however immediately when I start the code I get an Unhandled exception at 0x80002610 in Test.exe: 0xC0000005: Access violation executing location 0x80002610.
I was wondering where the access violation could possibly be coming from. Thanks for your help.
#include <SFML/Window.hpp>
#include <TGUI/TGUI.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
tgui::Gui gui(window);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
gui.handleEvent(event);
}
window.clear();
gui.draw();
window.display();
}
return 0;
}
The code compiles fine, however immediately when I start the code I get an Unhandled exception at 0x80002610 in Test.exe: 0xC0000005: Access violation executing location 0x80002610.
I was wondering where the access violation could possibly be coming from. Thanks for your help.