SFML community forums
Help => General => Topic started by: xeniac on March 26, 2022, 01:08:24 pm
-
Hello everyone!
I'm trying to compile program from this tutorial: https://www.sfml-dev.org/tutorials/2.5/start-linux.php (https://www.sfml-dev.org/tutorials/2.5/start-linux.php). I have Ubuntu 20.04, SFML 2.5.1. My sequence of actions:
g++ -c main.cpp -I/home/xenia/Documents/SFML/include
g++ main.o -o sfml-app -L/home/xenia/Documents/SFML/lib -lsfml-graphics -lsfml-window -lsfml-system
Full error message is here: https://anotepad.com/note/read/9986fexc (https://anotepad.com/note/read/9986fexc).
I do not know what to do. I searched the internet and it didn't come up with any results. A year ago, I downloaded the library and wrote simple examples, there was no such error. I remember that I started exactly the same way. Now I've decided to use it again.
Thank you in advance!
-
You need to install the necessary dependencies.
See also: https://www.sfml-dev.org/faq.php#tr-lnx-compile
-
I did sudo apt-get install libx11-dev libgl1-mesa-dev libudev-dev libfreetype6-dev libopenal-dev libflac-dev libvorbis-dev.
It didn't help, unfortunately. The errors are the same: https://anotepad.com/note/read/4eyicmm3 (https://anotepad.com/note/read/4eyicmm3)
-
Did you build SFML yourself?
-
No, I didn't.
Maybe try uninstalling and reinstalling?
-
did you install it trough "apt-get install libsfml-dev"?
-
Yes, I tired the library with this command.
I just reinstalled it. It did not help.
-
ok, so its probably not about missing dependencies.
are you using some IDE, like Code::Blocks of Visual Studio?
-
I write code in Sublime Text, but compile and run it manually on the command line.