Full Error:
error while loading shared libraries: libsfml-graphics.so.2.2.0: cannot open shared object file: No such file or directory
This is probably the quintillionth time I've run into this error with SFML. This error oddly only occurs when running the executable, rather than during compilation. I don't know what is causing the error (apart from the program not finding the file), since it worked like a charm before I reinstalled Ubuntu. I've tried sudo ldconfig and I have used sudo apt-get install libsfml-dev, but I don't link SFML using it, but from an extracted archive.
This answer relies on libsfml-dev being installed on your system. The way to fix it is removing all SFML options from the Search Directories>Linker, then make sure the linker settings looks something like this:

This means that CodeBlocks will link to the default place. Afterwards recompile the code (Edit the code so CodeBlocks will actually compile it). I was running g++ 4.9.2 but I'm not sure if the default 4.8.2 works, or if it makes any difference at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With