In Ubuntu 12.04.1 LTS I created a .so library file using this code:
g++ -c -Wall -Werror -fPIC someCode.cpp
g++ -shared -o libSomeCode.so someCode.o
I need to use that library file within an executable. But when running the .exe it cannot find the .so file. So I have to copy the library to /usr/lib/. I tried using this command (without success):
export LD_LIBRARY_PATH=/home/personalFolder/Desktop/codeFolder:$LD_LIBRARY_PATH
Is there a way to avoid copying the .so to /usr/lib/?
Thanks in advance.