Hello there!
I don't know if this is the right thread for this, but I have a problem compiling Thor.
I have pulled the lasted github version, configured cmake to point to SFML (2.3.0) and then generated two seperate debug and release projects (codeblocks).
When I open the debug project, compile and install it everything works as intended. But when I try to compile the release project, I get the following compile error:
cd /d F:\Librarys\Thor\Build\Release\src && C:\MinGW\bin\g++.exe -DTHOR_EXPORTS -Dthor_EXPORTS -std=c++0x -O3 -DNDEBUG @CMakeFiles/thor.dir/includes_CXX.rsp -o CMakeFiles\thor.dir\Action.cpp.obj -c F:\Librarys\Thor\Thor\src\Action.cpp
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\cmath:44:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\random:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:65,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62,
from F:/Librarys/official_SFML/install/include/SFML/System/Utf.hpp:32,
from F:/Librarys/official_SFML/install/include/SFML/System/String.hpp:32,
from F:/Librarys/official_SFML/install/include/SFML/Window/Joystick.hpp:32,
from F:/Librarys/Thor/Thor/include/Thor/Input/Joystick.hpp:34,
from F:/Librarys/Thor/Thor/include/Thor/Input/Detail/ActionOperations.hpp:29,
from F:/Librarys/Thor/Thor/include/Thor/Input/Action.hpp:32,
from F:\Librarys\Thor\Thor\src\Action.cpp:26:
c:\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
{ return (float)(_hypot (x, y)); }
^
According to
this SO its a MinGW compiler bug (I am using gcc 4.8.1 on windows). I fixed it like the first answer sugessted, but I was wondering, why is Thor using the flag -std=c++0x and not -std=c++11 ? It doesn't make a difference in this case, but I just noticed that. (also I wanted to show other people a solution, who might run into the same problem)