Tag: 编程
linux程序如何支持插件
by czyhd on 七.27, 2009, under 程序设计
今天小猴同学在研究这个,我也看了下。
给两段代码
1,插件部分,so.c
int add( int a, int b){
return a+b;
}
编译
gcc -c -fPIC so.c
gcc -shared -fPIC so.o -o so.so
by czyhd on 七.27, 2009, under 程序设计
今天小猴同学在研究这个,我也看了下。
给两段代码
1,插件部分,so.c
int add( int a, int b){
return a+b;
}
编译
gcc -c -fPIC so.c
gcc -shared -fPIC so.o -o so.so