Python论坛  - 讨论区

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

2006年04月29日 星期六 19:55

Jay wz12 at yeah.net
Sat Apr 29 19:55:59 HKT 2006


我使用了bcb5的 coff2omf 转化了,也是不行啊




From: "Gerald Lee" 
To: python-chinese at lists.python.cn
Date: Sat, 29 Apr 2006 17:46:12 +0800 (CST)
Subject: Re: [python-chinese] 编译swig时候的一点问题

VC的lib是COFF的,其它是标准的OMF的。


在06-4-29,imcs ee <imcsee at gmail.com> 写道:


请教个和这个相关的问题,一直不太明白。就是VC7.1和mingw之间"混用"会带来什么问题呢,我安装的python上下载的二进制的,应该是VC7.1编译的,而自己也下载过一些包含c/cpp源文件的python模块,是用mingw+swig编译的,看了一些讨论,好像这样两者会有些问题,好像是两者用的msvcrt不是同一个文件,而且更糟糕的是,虽然vs2005出来,又是不同的文件了,而python2.4/2.5官方版本都用vs2003编译。 
不太清楚具体的情况,可能上面好多自己理解错误,哪位给介绍下,一般情况下用mingw编译模块有什么问题么,(mingw主要是linux和win下面比较方便移植了吧)
另外,如果上面这个mingw有些缺陷的话,哪儿有些用Visual Studio .NET 2003来作模块的例子么,找了一下,都是提供用微软free的tookit来编译,连着还不太一样吧。

 

On 4/29/06, 刘鑫 <march.liu at gmail.com> wrote: 

Window平台的Python2.4是用VC7.1编译的,想要用MinGW来调用,必须自己编译一份Python24.lib



在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






-- 
欢迎访问:
http://blog.csdn.net/ccat 

刘鑫
March.Liu

_______________________________________________
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



_______________________________________________
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



-- 
My Blog >> http://leejd.cndev.org
My QQ >> 9847243 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060429/b16a64bf/attachment-0001.html

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号