Sorry guys. Total newbie to SFML here.
I am trying to test if I can use SFML for a personal project. Well, I cannot even get a basic project to run.
Using Microsoft Visual Studio Community 2017 Version 15.9.21 (installed latest updates) for C++ under Windows 10 Pro.
Followed instructions from
https://www.sfml-dev.org/tutorials/3.0/getting-started/visual-studio/ They seem pretty straightforward:
- downloaded the SFML 3.0.0 for VS 2017 Visual C++ 16 (2019) in both 32 and 64b
- created a new "Empty Project" in VS.
- set the C++ language to ISO C++ 17 Standard
- set the include path
- set the lib path
- added the following lib dependencies: sfml-graphics.lib, sfml-window.lib and sfml-system.lib (and the -d version for Debug configurations).
- copied the dlls to the executable folder.
I used exactly the suggested code (to draw a green circle) in a file named main.cpp added to the project.
First problem: the Release versions, in either Win32 or x64 platform, fail to compile causing a compiler crash.
1>------ Rebuild All started: Project: Project1, Configuration: Release x64 ------
1>main.cpp
1>c:\sfml\sfml-3.0.0-windows-vc16-64-bit\sfml-3.0.0\include\sfml\system\exception.hpp(42): warning C4275: non dll-interface class 'std::runtime_error' used as base for dll-interface class 'sf::Exception'
Ignoring this for now and moving on to running the Debug versions. They compile and link but crash at runtime.
Exception thrown at 0x007818ED in Project1.exe: 0xC0000005: Access violation writing location 0x7C013190.
static inline const std::size_t InvalidPos{std::u32string::npos}; [file String.hpp l. 102]
Does anyone know where the problem could be, or if there is a ready-made SFML Hello World project file somewhere?