Linux下編譯動態連接庫

可用如下兩條命令編譯動態連接庫: gcc -fPIC -c dllname.cc gcc -shared -o dllname.so dllname.o 在宿主程序中使用dlopen、dlsym、dlclose和dlerror四個函數調用動態連接庫。 宿主程序使用這幾個函數時要加上#include<dlfcn.h >。
相關文章
相關標籤/搜索