#include //include位置:/usr/include
#include
using namespace std;
int main() {
cout << "Hello World" <
return 0;
}
g++ -o test test.cpp //用g++ gcc编译会出错
ldconfig 动态加载so库?!
g++ iga.cpp -lcjson -o iga
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c iga.cpp -o build/temp.linux-x86_64-2.7/iga.o -lcjson -lpython2.7
g++ -pthread -shared -Wl,-z,relro build/temp.linux-x86_64-2.7/iga.o -L/usr/lib64 -lpython2.7 -o build/lib.linux-x86_64-2.7/iga.so -lcjson -lpython2.7
python distribute.py