1. 程式人生 > >codeblocks配置生成動態庫.so的環境

codeblocks配置生成動態庫.so的環境

1.建立工程,選擇shared library

2.compiler setting->Other compiler options: -shared -fPIC

4.配置好之後直接編譯即可,.so檔案會生成在工程所在的bin資料夾下

5.呼叫動態庫.so,需要配置當前動態庫的環境,同時也需要先前的環境。