Hello,
I've been trying to setup a project with SFML but I can't compile the tutorial, I followed the steps carefully, tried debug, release, static, non-static, etc... But Im still getting this error when I try to compile:
Output:Build started...
1>------ Build started: Project: 04-hello-sfml, Configuration: Debug x64 ------
1>main.cpp
1>C:\Users\pc2\Documents\sfml\include\SFML\System\Vector2.inl(291,34): error C2370: 'sf::Vector2<T>::UnitX': redefinition; different storage class
1>C:\Users\pc2\Documents\sfml\include\SFML\System\Vector2.hpp(204): message : see declaration of 'sf::Vector2<T>::UnitX'
1>C:\Users\pc2\Documents\sfml\include\SFML\System\Vector2.inl(294,34): error C2370: 'sf::Vector2<T>::UnitY': redefinition; different storage class
1>C:\Users\pc2\Documents\sfml\include\SFML\System\Vector2.hpp(205): message : see declaration of 'sf::Vector2<T>::UnitY'
1>Done building project "04-hello-sfml.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The code that im trying to compile is the tutorial one
https://www.sfml-dev.org/tutorials/2.5/start-vc.php. Im including only SFML/Graphics.hpp
Also, when I go into Vector2.inl to see what's going on, the IDE is throwing a lot of errors like "Vector2 is not a template", "name followed by '::' must be a class or namespace name", etc... Maybe the problem is the compiler or the C++ version, I don't know.
IDE: Visual Studio 2022
SFML version: Last one from Snapshots (windows-vc17-64.zip), I don't know how to see the version
IDE C++ Language Standard: ISO C++20 Standard
Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.31.31105 for x86