You should get out of eclipse and just use the command line until you have this sorted. Eclipse is just a complex way to obfuscating the command line.
To link a .so, you need:
- -LpathToLibrary
- -lnameOfLibrary, with 'lib' and '.so' stripped off.
If your library is sitting in /usr/lib, which is suggested by what you are trying, then you don't need the -L at all. If the name is 'liballegro5.so', you'll need -lallegro5.
I recommend:
find /usr -name liballegro.so -print
if the answer is '/usr/lib/liballegro.so', then all you need is -lallegro.
If the answer is /SOMETHINGELSE/liballegro.so, then you need -L/SOMETHINGELSE/.
If you don't find liballegro, then you need to figure out if it's actually liballegro5.so.
You can also stop using -L and -l and just put the entire path of the .so in there.