Hi, I'm newbie, i recently downloaded the SFML 2.4.2 library and i tried to use it into a my own project.
I followed the official tutorial (
https://www.sfml-dev.org/tutorials/2.4/start-cb.php), but i have a problem.
I used the static library version, so i linked the necessary lib (graphics, window and finally system), and i tried to build the project, Below the main.cpp:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
And now the output error:
||=== Build: Release in smfl snake (compiler: GNU GCC Compiler) ===|
C:\Users\User\SFML-2.4.2\lib\libsfml-graphics-s.a(CircleShape.cpp.obj):CircleShape.cpp|| undefined reference to `_Unwind_Resume'|
C:\Users\User\SFML-2.4.2\lib\libsfml-graphics-s.a(CircleShape.cpp.obj):CircleShape.cpp:(.text$_ZN2sf11CircleShapeD0Ev[__ZN2sf11CircleShapeD0Ev]+0x24)||undefined reference to `operator delete(void*, unsigned int)'|
||error: ld returned 1 exit status|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 5 second(s)) ===|
I have the suspicion that i don't include all necessary lib, but i dont't know what.
Anyone can help me?
Thanks.
P.S.: I use Code::Blocks, MinGW