Hi there,
I installed SFML from the Arch Linux community repository (which I'm pretty sure just pulls from the HEAD of the repo on Github):
community/sfml 1.99.git20120312-1 [installed]
A simple, fast, cross-platform, and object-oriented multimedia API
And I have the proper shared object files:
▕ lrwxrwxrwx▏3 hour│ 18B│libsfml-audio.so => libsfml-audio.so.2
▕ lrwxrwxrwx▏3 hour│ 20B│libsfml-audio.so.2 => libsfml-audio.so.2.0
▕ -rwxr-xr-x▏3 hour│ 64K│libsfml-audio.so.2.0
▕ lrwxrwxrwx▏3 hour│ 21B│libsfml-graphics.so => libsfml-graphics.so.2
▕ lrwxrwxrwx▏3 hour│ 23B│libsfml-graphics.so.2 => libsfml-graphics.so.2.0
▕ -rwxr-xr-x▏3 hour│ 589K│libsfml-graphics.so.2.0
▕ lrwxrwxrwx▏3 hour│ 20B│libsfml-network.so => libsfml-network.so.2
▕ lrwxrwxrwx▏3 hour│ 22B│libsfml-network.so.2 => libsfml-network.so.2.0
▕ -rwxr-xr-x▏3 hour│ 108K│libsfml-network.so.2.0
▕ lrwxrwxrwx▏3 hour│ 19B│libsfml-system.so => libsfml-system.so.2
▕ lrwxrwxrwx▏3 hour│ 21B│libsfml-system.so.2 => libsfml-system.so.2.0
▕ -rwxr-xr-x▏3 hour│ 39K│libsfml-system.so.2.0
▕ lrwxrwxrwx▏3 hour│ 19B│libsfml-window.so => libsfml-window.so.2
▕ lrwxrwxrwx▏3 hour│ 21B│libsfml-window.so.2 => libsfml-window.so.2.0
▕ -rwxr-xr-x▏3 hour│ 80K│libsfml-window.so.2.0
But when I try to compile a simple example (without linking):
[~/workspace/zombeh/src]$ g++ main.cpp []
/tmp/ccAzHcgf.o: In function `main':
main.cpp:(.text+0x6c): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
main.cpp:(.text+0x93): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::WindowSettings const&)'
main.cpp:(.text+0xbf): undefined reference to `sf::RenderWindow::~RenderWindow()'
main.cpp:(.text+0xf3): undefined reference to `sf::RenderWindow::~RenderWindow()'
collect2: ld returned 1 exit status
And with linking:
[~/workspace/zombeh/src]$ g++ main.cpp -lsfml-graphics -lsfml-window -lsfml-system
/tmp/cckWyWRM.o: In function `main':
main.cpp:(.text+0x93): undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::WindowSettings const&)'
collect2: ld returned 1 exit status
Which leads me to believe the linking and installation is working fine but I'm confused what's wrong.
I checked the source from the git repository pointed to in the PKGBUILD and it looks like I'm using the API properly (and in accordance with the documentation on the site).
Anyone use SFML and could lend me a hand, please?
Thanks for any help!