Can I create a shared library from the C and C++ object files?. If possible where should I use it? (in C/C++ applications or both).
Not all situation you can do that. If you have source code, you can compile them as:
gcc -fPIC exam.c -o exam.o
gcc -shared exam.o -o libexam.so
PIC means position-independent code. And if a object file is compiled with -fPIC, it can be used to create shared lib.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.