Compile Dynamic Link Library under Linux

xiaoxiao2021-03-06  14

Dynamic link libraries can be compiled with the following two commands:

gcc-fpic -c dllname.cc

gcc -shared -o dllname.so dllname.o

Use DLOPEN, DLSYM, DLCLOSE, and DLOPEN, DLSYM, DLCLOSE, and DLERROR in the host program to call dynamic link libraries.

When the host program uses these functions, add #include .

转载请注明原文地址:https://www.9cbs.com/read-50314.html

New Post(0)