Codeblocks didn't work for me when I compile it with ordinary c++ -sfml program it says
error while loading shared libraries llbsfml-graphics.so.2 like that
But it works correctly on terminal ,
So I looked how to compile with external libraries and I did this in terminal :
g++ -std=c++11 -I/home/kishore/SFML-2.4.2/include -c main.cpp -o main.o
which compiles with no problem
g++ main.o -o sfml-app -L/home/kishore/SFML-2.4.2/lib -lsfml-graphics -lsfml-window -lsfml-system
again no problem
but when i try to run ./sfml-app
I get the following error :
error while loading shared libraries: libsfml-graphics.so.2.4: cannot open shared object file: No such file or directory
The same one I got during codeblocks , What am I doing wrong ? any help would be appreciated .