在Cygwin下编译python扩展库的问题 - 悲催的科学匠人 - 冷水's blog

在Cygwin下编译python扩展库的问题

冷水 posted @ 2013年8月12日 02:51 in python , 1738 阅读

折腾的半天,原来是这样

1 gcc编译c代码时的-fPIC开关在cygwin下没用了,去掉即可。

2 连接python扩展库时,需要指定连接python库

 

gcc -shared a.o a_wrap.o -lpython2.6  -o _a.dll

注意是dll文件,不再是so了

3 此外-Bstatic和-Bdynamic似乎要去掉

 

  • 无匹配
  • 无匹配

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee