Hi,
i recently installed linux mint and tryed to get sfml work on it.
But before I tryed to make sfml work, I installed the newest Version of the GCC-toolchain (GCC 5.3.0).
Cause I read that GNU somewhen changed some APIs in the GCC-API, I compiled SFML by myself (everything worked fine till now).
But now, if I compile a test-sfml project:
#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;
}
With
g++ main.cpp -DSFML_STATIC -Wl,-Map,mapfile.txt -L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/ -lGL -lX11 -lX11-xcb -ljpeg -lxcb -lxcb-randr -lxcb-image -ludev -lpthread -lFLAC -logg -lfreetype -lopenal -lvorbis -lvorbisenc -lvorbisfile -lsfml-graphics-s -lsfml-window-s -lsfml-system-s
And run the executable I'm getting the this error:
./a.out: relocation error: ./a.out: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
In the mapfile.txt everything looks fine (the right libaries are getting linked) and if I run
strings libstdc++.so | grep _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
I get this output:
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm
However I suppose, I'm getting this error cause I mixed up some libraries, but if that's in case, how I can figure it out correctly?
Or anyone have other ideas?
Thanks
Julian