Hi!
Well I am not pro @ C/C++ I have just started to learn for my college studies. Here is what we do in lab:
After creating shared lib you need to execute command (note . after -n option):
Then setup linker name (for exmple if your lib name is libmyapp then it should be as follow
Code:
ln -sf libmyapp.so.0 libmyapp.so
Now compile your program
Code:
gcc -Wall -g -c mytestprog.c -o mytestprog.o
Now build and link (note . after -L option)
Code:
gcc -g -o mytestprog mytestprog.o -L. -llibmyapp
To execute program (note . )
Code:
LD_LIBRARY_PATH="."
./mytestprog
Read man page of ldconfig and gcc for more info.
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat