Make sure you add the directory containing the allegro library (liballeg.so.4.0) to the LD_LIBARY_PATH and LIBRARY_PATH enviroment variable for linux to find the library.

