mac10.6.8中Swig和g++链接错误

2024-09-29 02:21:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一些代码可以在linux下运行,现在我正试图在max10.6.8下编译代码。我使用的是epd32位python,g++版本4.2.1,swig版本2.0.9。下面是我使用的命令

swig -c++ -python pythoncpp.i
g++ -O2 -fPIC -c  pythoncpp_wrap.cxx -I/PATH/Library/EPD/2.7-32/include/python2.7  -I/PATH/local/gsl/include
g++ -O2 -fPIC -c  pythoncpp_wrap.cxx -I/PATH/Library/EPD/2.7-32/include/python2.7  -I/PATH/local/gsl/include
g++  -L/Users/densmore3/local/gsl/lib -lpython -dynamclib pythoncpp.o pythoncpp_wrap.o -lgsl -lgslcblas -lm -o _pythoncpp.dylib

前三行运行时出现错误或警告。但是,连接线抛出以下错误

^{pr2}$

如何修复此错误?谢谢


Tags: path代码版本includelocal错误librarycxx