how can I link a shared object in C?
问题 I made a simple program that uses a shared object, opening it with dlopen() . I also compiled and linked the shared object like below: gcc -o libmylib.so libmylib.c -shared -fPIC -Wall gcc -o program program.c -L. -lmylib -ldl -Wall When I tried to run the program for the first time it said something like cannot open libmylib.so: no such file or directory so I searched the internet and found that I have to copy my shared object to /lib/i386-linux-gnu/ in order for the program to run. So I did