Python论坛  - 讨论区

标题:Re: Re:_[python-chinese]_编译swig时候的一点问题

2006年04月29日 星期六 11:58

Jay wz12 at yeah.net
Sat Apr 29 11:58:51 HKT 2006


我用的是swig自己的例子,带有include python.h了




From: "大熊" 
To: python-chinese at lists.python.cn
Date: Sat, 29 Apr 2006 07:42:03 +0800 (CST)
Subject: Re:_[python-chinese]_编译swig时候的一点问题

没有include python.h?


在06-4-29,Jay <wz12 at yeah.net> 写道∶


大家好。
我本来安装有bcb5, 编译的时候感觉问题很多;知道borland的二进制格式和MS的不同,可能麻烦很多;于是放弃理想∶―)
我没有VC,安装了Dev―C++,采用它的gcc
 
编译的时候有下面的的错误; 从错误情况看,编译是没有问题的;问题是链接的时候找不到
一些函数的出处。
 
在次请教各位,该怎么办
 
 
E:\install\swigwin-1.3.29\Examples\python\simple>gcc -D__WIN32__ -fPIC -shared e
xample.c example_wrap.c -o example.dll -Id:\p\python24\include -LD:\P\python24\l
ibs -lpython24 -lpyexpat -lselect
cc1.exe: warning: -fPIC ignored for target (all code is position independent)
cc1.exe: warning: -fPIC ignored for target (all code is position independent)
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9a9):example_wrap.c: undefined
reference to `_imp__PyExc_MemoryError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9b8):example_wrap.c: undefined
reference to `_imp__PyExc_IOError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9c4):example_wrap.c: undefined
reference to `_imp__PyExc_RuntimeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9d0):example_wrap.c: undefined
reference to `_imp__PyExc_IndexError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9dc):example_wrap.c: undefined
reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9e8):example_wrap.c: undefined
reference to `_imp__PyExc_ZeroDivisionError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x9f4):example_wrap.c: undefined
reference to `_imp__PyExc_OverflowError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xa00):example_wrap.c: undefined
reference to `_imp__PyExc_SyntaxError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xa0c):example_wrap.c: undefined
reference to `_imp__PyExc_ValueError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xa18):example_wrap.c: undefined
reference to `_imp__PyExc_SystemError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xa24):example_wrap.c: undefined
reference to `_imp__PyExc_AttributeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xa30):example_wrap.c: undefined
reference to `_imp__PyExc_RuntimeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xb23):example_wrap.c: undefined
reference to `_imp__PyExc_RuntimeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xbe8):example_wrap.c: undefined
reference to `_imp___Py_NoneStruct'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xc21):example_wrap.c: undefined
reference to `_imp__PyList_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xc2c):example_wrap.c: undefined
reference to `_imp__PyList_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xdbb):example_wrap.c: undefined
reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xddf):example_wrap.c: undefined
reference to `_imp__PyTuple_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xdea):example_wrap.c: undefined
reference to `_imp__PyTuple_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xe0b):example_wrap.c: undefined
reference to `_imp__PyExc_SystemError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xe65):example_wrap.c: undefined
reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xeb6):example_wrap.c: undefined
reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0xfac):example_wrap.c: undefined
reference to `_imp__PyClass_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x1aa9):example_wrap.c: undefined
 reference to `_imp__PyType_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x1ea5):example_wrap.c: undefined
 reference to `_imp__PyType_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2020):example_wrap.c: undefined
 reference to `_imp__PyInstance_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x20ac):example_wrap.c: undefined
 reference to `_imp___PyWeakref_ProxyType'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x20ba):example_wrap.c: undefined
 reference to `_imp___PyWeakref_CallableProxyType'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2446):example_wrap.c: undefined
 reference to `_imp__PyCFunction_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2e02):example_wrap.c: undefined
 reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2e20):example_wrap.c: undefined
 reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2e66):example_wrap.c: undefined
 reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2e81):example_wrap.c: undefined
 reference to `_imp__PyExc_TypeError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2edc):example_wrap.c: undefined
 reference to `_imp__PyFloat_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2ee7):example_wrap.c: undefined
 reference to `_imp__PyFloat_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2f30):example_wrap.c: undefined
 reference to `_imp__PyInt_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2f3b):example_wrap.c: undefined
 reference to `_imp__PyInt_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2f89):example_wrap.c: undefined
 reference to `_imp__PyLong_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x2f94):example_wrap.c: undefined
 reference to `_imp__PyLong_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x300c):example_wrap.c: undefined
 reference to `_imp__PyInt_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x3017):example_wrap.c: undefined
 reference to `_imp__PyInt_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x305f):example_wrap.c: undefined
 reference to `_imp__PyLong_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x306a):example_wrap.c: undefined
 reference to `_imp__PyLong_Type'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x38dd):example_wrap.c: undefined
 reference to `_imp__PyExc_NameError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x3962):example_wrap.c: undefined
 reference to `_imp__PyExc_NameError'
C:\DOCUME~1\Jay\LOCALS~1\Temp/ccgxcaaa.o(.text+0x3a2a):example_wrap.c: undefined
 reference to `_imp__PyType_Type'
 
E:\install\swigwin-1.3.29\Examples\python\simple>

 
 
Jay
_______________________________________________
python-chinese
Post: send python-chinese at lists.python.cn 
Subscribe: send subscribe to python-chinese-request at lists.python.cn
Unsubscribe: send unsubscribe to   python-chinese-request at lists.python.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese



-- 
茫茫人海,你是我的最爱 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060429/7c1ebe28/attachment-0001.htm

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号