SFML community forums
Help => Window => Topic started by: topiser on September 01, 2010, 04:25:31 am
-
After setting up sfml to work in linux, i moved on to the Opening A Window tutorial. When creating the main window using sf::Window, i got and error that I can't seem to overcome.
bob.cpp:(.text+0xe4): undefined reference to `sf::Window::Window(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, sf::ContextSettings const&)'
I checked my code a few times, copy and pasted the code just to make sure, so i'm sure its not anything I've mistyped. I also have my IDE build with "-lsfml-window -lsfml-system" so I assume i didn't screw up there either.
I'm pretty sure it's something simple i overlooked, so if you can give me any advice I'd appriciate it :D
-
Does the same thing happen when you compile from the terminal? If not, it's an IDE related problem.
-
The SFML 2 libraries are now named "sfml2-xxx". You should remove all the previous binaries (SFML 1, old SFML 2) to avoid this kind of confusion.
PS: next time, please don't forget to tell us that you're using SFML 2... ;)
-
Thanks for the advice, but it still doesn't work. I cleaned my system of all SFML versions, then using make, reinstalled SFML2. I tried putting the libraries as sfml2-xxx, but it didn't recognize them. It does recognize them as lsfml-xxx, so i'm not sure why its still like that. If i do use lsfml-xxx though it still gets the same error as before.
Edit: Nevermind, i got it to work. I'm using Geany IDE, which lets you set commands to buttons to make compiling a lot faster, and i forgot i had put in 3 libraries, but the box was too short and only showed 2, so every time i only changed the first 2 library names, and left the last one as lsfml-xxx.
Thanks for all your help :D I'm happy i can now start doing some game programming in linux. Pretty much don't need windows anymore :D