1.安装cython
pip install cython
2.编译py文件成.c文件
cython test.py
3.生成.o文件
gcc -c -fPIC test.c
4.生成.so文件
gcc -shared test.o -o test.so
其中们我们实用gcc编译程序时,常常会用到“-I”(大写i),“-L”(大写L),“-l”(小写L)等参数
-I 参数后面指定第一个
pip install cython
cython test.py
gcc -c -fPIC test.c
gcc -shared test.o -o test.so
其中们我们实用gcc编译程序时,常常会用到“-I”(大写i),“-L”(大写L),“-l”(小写L)等参数
-I 参数后面指定第一个