vectozavr / shooter

First person shooter written on 3dzavr game engine.

Home Page:https://vectozavr.ru

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Не могу скомпилировать

breadlol64 opened this issue · comments

когда я загрузил код в clion скачал sfml и тд у меня такая ошибка:

====================[ Build | shooter | Debug ]=================================
"C:\Program Files\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" --build C:\Users\artur\Desktop\shooter-master\cmake-build-debug --target shooter -j 3
[1/22] Building CXX object CMakeFiles/shooter.dir/3dzavr/engine/utils/Time.cpp.obj
FAILED: CMakeFiles/shooter.dir/3dzavr/engine/utils/Time.cpp.obj
"C:\PROGRA~1\JetBrains\CLion 2023.1.5\bin\mingw\bin\g++.exe" -DSFML_STATIC -isystem C:/Libraries/SFML/include -g -fdiagnostics-color=always -std=gnu++20 -MD -MT CMakeFiles/shooter.dir/3dzavr/engine/utils/Time.cpp.obj -MF CMakeFiles\shooter.dir\3dzavr\engine\utils\Time.cpp.obj.d -o CMakeFiles/shooter.dir/3dzavr/engine/utils/Time.cpp.obj -c C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp
In file included from C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:5:
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:15:19: error: 'string' is not a member of 'std'
15 | std::map<std::string, Timer> _timers;
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:12:1: note: 'std::string' is defined in header ''; did you forget to '#include '?
11 | #include "Timer.h"
+++ |+#include
12 |
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:15:32: error: template argument 1 is invalid
15 | std::map<std::string, Timer> _timers;
| ^
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:15:32: error: template argument 3 is invalid
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:15:32: error: template argument 4 is invalid
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:15:10: error: '' in namespace 'std' does not name a type
15 | std::map<std::string, Timer> _timers;
| ^~~~~~~~~~~~~~~~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:52:39: error: 'string' in namespace 'std' does not name a type
52 | static void startTimer(const std::string& timerName);
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:52:34: note: 'std::string' is defined in header ''; did you forget to '#include '?
52 | static void startTimer(const std::string& timerName);
| ^~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:53:38: error: 'string' in namespace 'std' does not name a type
53 | static void stopTimer(const std::string& timerName);
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:53:33: note: 'std::string' is defined in header ''; did you forget to '#include '?
53 | static void stopTimer(const std::string& timerName);
| ^~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:55:69: error: 'string' in namespace 'std' does not name a type
55 | [[nodiscard]] static double elapsedTimerMilliseconds(const std::string& timerName);
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:55:64: note: 'std::string' is defined in header ''; did you forget to '#include '?
55 | [[nodiscard]] static double elapsedTimerMilliseconds(const std::string& timerName);
| ^~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:56:64: error: 'string' in namespace 'std' does not name a type
56 | [[nodiscard]] static double elapsedTimerSeconds(const std::string& timerName);
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:56:59: note: 'std::string' is defined in header ''; did you forget to '#include '?
56 | [[nodiscard]] static double elapsedTimerSeconds(const std::string& timerName);
| ^~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:40: error: 'string' is not a member of 'std'
58 | [[nodiscard]] static std::map<std::string, Timer> const & timers() { return _instance->_timers; }
| ^~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:40: note: 'std::string' is defined in header ''; did you forget to '#include '?
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:53: error: template argument 1 is invalid
58 | [[nodiscard]] static std::map<std::string, Timer> const & timers() { return _instance->_timers; }
| ^
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:53: error: template argument 3 is invalid
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:53: error: template argument 4 is invalid
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:58:31: error: '' in namespace 'std' does not name a type
58 | [[nodiscard]] static std::map<std::string, Timer> const & timers() { return _instance->_timers; }
| ^~~~~~~~~~~~~~~~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:72:6: error: no declaration matches 'void Time::startTimer(const string&)'
72 | void Time::startTimer(const std::string &timerName) {
| ^~~~
In file included from C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:5:
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:52:17: note: candidate is: 'static void Time::startTimer(const int&)'
52 | static void startTimer(const std::string& timerName);
| ^~~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:13:7: note: 'class Time' defined here
13 | class Time final {
| ^~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:80:6: error: no declaration matches 'void Time::stopTimer(const string&)'
80 | void Time::stopTimer(const std::string &timerName) {
| ^~~~
In file included from C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:5:
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:53:17: note: candidate is: 'static void Time::stopTimer(const int&)'
53 | static void stopTimer(const std::string& timerName);
| ^~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:13:7: note: 'class Time' defined here
13 | class Time final {
| ^~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:89:8: error: no declaration matches 'double Time::elapsedTimerMilliseconds(const string&)'
89 | double Time::elapsedTimerMilliseconds(const std::string &timerName) {
| ^~~~
In file included from C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:5:
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:55:33: note: candidate is: 'static double Time::elapsedTimerMilliseconds(const int&)'
55 | [[nodiscard]] static double elapsedTimerMilliseconds(const std::string& timerName);
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:13:7: note: 'class Time' defined here
13 | class Time final {
| ^~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:99:8: error: no declaration matches 'double Time::elapsedTimerSeconds(const string&)'
99 | double Time::elapsedTimerSeconds(const std::string &timerName) {
| ^~~~
In file included from C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.cpp:5:
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:56:33: note: candidate is: 'static double Time::elapsedTimerSeconds(const int&)'
56 | [[nodiscard]] static double elapsedTimerSeconds(const std::string& timerName);
| ^~~~~~~~~~~~~~~~~~~
C:/Users/artur/Desktop/shooter-master/3dzavr/engine/utils/Time.h:13:7: note: 'class Time' defined here
13 | class Time final {
| ^~~~

error: 'string' is not a member of 'std'
Means you have to add #include <string>