1、new->c project->shared library->empty project->project name->finish
2、添加source?folder,添加src?file等跟正常的項(xiàng)目一樣
3、properties->c/c++ build->settings->gcc c compiler ->miscellaneous->勾選-fPIC->apply and close
4、build?project后在debug文件夾里生成相應(yīng)的.so文件。