Python extensions using MinGW and CXX

Reinhard Nadrchal reinhard at proceryon.at
Fri Feb 14 02:15:21 EST 2003


Reinhard Nadrchal wrote:
> Gerhard Häring wrote:
> 
>> Reinhard Nadrchal <reinhard at proceryon.at> wrote:
>>
>>> Hi all,
>>>
>>> In the course of porting our software (currently running on linux and 
>>> irix) we faced some problems with python extension modules based on 
>>> Paul Dubois' CXX.
>>>
>>> Our problem is, that pyds generated with the MinGW compiler/linker 
>>> seems to be incompatible with the Windows python interpreter.
>>>
>>> If we naively link python20.dll to our extension,
>>
>>
>>
>> Python 2.0 is antique. And still using it probably qualifies as naive :-P
> 
> 
> Sorry, but we are urged to compile python ourselves and link to older 
> libc versions for compatibility reasons - and as you can imagine this is 
> quite a lot of maintainance.
> 
>>
>>
>>> it compiles and links, bot the python interpreter crashes on 
>>> importing the module. If we on the other hand create a export library 
>>> with pexport and dlltool, we get a lot of unresolved references. Is 
>>> there a way to fix the problem (without using distutils or VC++).
>>
>>
>>
>> Using distutils likely solves your problem. Why can't you use it? If 
>> CXX does
>> what I think it does, i. e. create C++ source files, then you can just 
>> use
>> distutils to compile the *generated* files.
>>
>> -- Gerhard
> 
> 
> So do you think the problem cannot be solved without distutils ? (By the way, CXX is a C++ layer upon the Python C API, similar to boost python)
> 
> Reinhard
> 
> 







More information about the Python-list mailing list