First find out where you have the library file. The command is
locate libSDL_image-1.2.so.0
In my system it shows
Code:
/usr/lib/libSDL_image-1.2.so.0
/usr/lib/libSDL_image-1.2.so.0.1.1
It's in a good directory, that's in all paths it needs to be. But it may be in a strange location. In such case you'll need to add the directory to LD_LIBRARY_PATH or to ld.so.conf.
LD_LIBRARY_PATH is for libraries what PATH is to executables. All below applies to LD_LIBRARY_PATH as well.
/etc/ld.so.conf is a file where directories with libraries are in. It has the same effect as adding it to LD_LIBRARY_PATH, but remember to run 'ldconfig' after any modification of the file.
Add this point I can try to make the PATH issue clear for you. To run an executable, you type its name. But only directories in PATH are searched. That's why you add the exact directory the executable is in to PATH.
The default is to install executable in bin/ or sbin/ directories (like /usr/bin, /bin, /sbin and so on). Such directory must be added to PATH once, when fist executable is moved into it.
It happens that programs don't install in default directories. For example, OpenSSL installs to /usr/local/openssl. The executable goes to /usr/local/openssl/bin (if I remember correctly) and the directory is not in PATH.