Chinaunix首页 | 论坛 | 博客
  • 博客访问: 369040
  • 博文数量: 162
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1501
  • 用 户 组: 普通用户
  • 注册时间: 2016-10-21 19:45
文章分类
文章存档

2018年(1)

2017年(101)

2016年(60)

分类: C/C++

2017-03-07 13:15:06

#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

阅读(896) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~