Hi there,
(I'm not sure if this topic belongs here or if I should contact the Thor dev directly)
I've built SFML using cmake and MinGW 4.8.1 and I'm using the latest nightly build of Thor but it crashes. I've read the documentation on it and I've searched the forums but no one seems to have the same problem as I do.
Here's the code
#include <iostream>
#include "SFML/Graphics.hpp"
#include "SFML/System.hpp"
#include "Thor/Input.hpp"
int main()
{
thor::Action c(sf::Event::Closed);
thor::ActionMap<std::string> map;
map["exit"] = c;
sf::RenderWindow window(sf::VideoMode(640,480,32), "Hello", sf::Style::Close | sf::Style::Titlebar);
while (window.isOpen())
{
map.update(window);
if (map.isActive("exit"))
window.close();
window.display();
}
}
And here's the entire error:
C:\Users\Xilen\AppData\Local\Temp\ccVwUy6F.o:main.cpp:(.text+0xe4): undefined reference to `thor::Action::Action(sf::Event::EventType)'
C:\Users\Xilen\AppData\Local\Temp\ccVwUy6F.o:main.cpp:(.text$_ZN4thor9ActionMap
ISsEC1Ev[__ZN4thor9ActionMapISsEC1Ev]+0x63): undefined reference to `thor::detail::EventBuffer::EventBuffer()'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: C:\Users\Xilen\AppData\Local\Temp\ccVwUy6F.o: bad reloc address 0x63 in section `.text$_Z
N4thor9ActionMapISsEC1Ev[__ZN4thor9ActionMapISsEC1Ev]'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link
failed: Invalid operation
collect2.exe: error: ld returned 1 exit status
Is there a MinGW command line arg that I have to use to get it working?