Error compilation SFML debian -
i have install sfml1.6 on debian school project.
on compilation have theses error :
g++ -c main.cpp
g++ main.o -o bomberman -lsfml-graphics
/usr/local/lib/libsfml-graphics.so: undefined reference
sf::unicode::text::text()' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::context::getglobal()' /usr/local/lib/libsfml-graphics.so: undefined referencesf::window::onevent(sf::event const&)' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::window::create(sf::videomode, std::basic_string, std::allocator > const&, unsigned long, sf::windowsettings const&)' /usr/local/lib/libsfml-graphics.so: undefined referencesf::context::setactive(bool)' /usr/local/lib/libsfml-graphics.so: undefined reference to
typeinfo sf::window' /usr/local/lib/libsfml-graphics.so: undefined referencesf::window::create(unsigned long, sf::windowsettings const&)' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::window::getheight() const' /usr/local/lib/libsfml-graphics.so: undefined referencesf::window::window()' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::unicode::text::text(unsigned int const*)' /usr/local/lib/libsfml-graphics.so: undefined referencesf::window::~window()' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::context::iscontextactive()' /usr/local/lib/libsfml-graphics.so: undefined referencesf::window::setactive(bool) const' /usr/local/lib/libsfml-graphics.so: undefined reference to
sf::unicode::text::operator std::basic_string, std::allocator > const&() const' /usr/local/lib/libsfml-graphics.so: undefined reference `sf::window::getwidth() const' collect2: ld returned 1 exit status make: * [all] error 1
i not understand why theses error comes out. libsfml-* located in /usr/lib/ , needed include in /usr/include
you have link window , system library of sfml well.
g++ main.o -o bomberman -lsfml-graphics -lsfml-window -lsfml-system
you should read this tutorial
Comments
Post a Comment