I'm working on a project with Code:Blocks and I decided to migrate to Visual Studio 2017.
Everythig was ok with this project on CB, but now on VS I get a runtime error "Access Violation" on some SFML Classes. They are outside "main".
For example, in any project, just put "Renderwindow" line outside main and you will get the "Access Violation" runtime error:
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
int main()
Error:
Unhandled exception at 0x00007FF8DF70B709 (ntdll.dll) in teste.exe: 0xC0000005: Access violation writing location 0x0000000000000008. occurred
But I need these classes as
Global, and as I said, it was ok on CB, so, how can I solve this?