[PyQt] unable to load the postgre sql drivers in pyqt

Phil Thompson phil at riverbankcomputing.co.uk
Sun Dec 30 22:20:19 GMT 2007


On Sunday 30 December 2007, nishith datta wrote:
> hi all,
>   ignore the last post - I figured it out that gcc is complaining there is
> no python25 dir i.e I have installed python25 in E:\Python25 I resolved the
> problem with the follwing command line :-
>             
> E:\downloads\pythonAndQt\sip-4.7-snapshot-20071228>mingw32-make -C e:\ It
> did proceed but the error is at some other place. I can't figure this thing
> out by myself - so someone please help me out . The screen dump is as under
> :- E:\downloads\pythonAndQt\sip-4.7-snapshot-20071228>mingw32-make -C e:\
> mingw32-make: Entering directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-2007 1228'
> mingw32-make[1]: Entering directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-2 0071228/sipgen'
> makefile:29: warning: overriding commands for target `.c.o'
> makefile:26: warning: ignoring old commands for target `.c.o'
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o main.o main.c
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o transform.o
> transform.c gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o gencode.o
> gencode.c gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o export.o
> export.c gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o heap.o
> heap.c gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o parser.o
> parser.c gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -o lexer.o
> lexer.c g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runt ime-pseudo-reloc -Wl,-subsystem,console -Wl,-s -o sip.exe
> main.o transform.o gen code.o export.o heap.o parser.o lexer.o
> mingw32-make[1]: Leaving directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-20 071228/sipgen'
> mingw32-make[1]: Entering directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-2 0071228/siplib'
> makefile:29: warning: overriding commands for target `.c.o'
> makefile:26: warning: ignoring old commands for target `.c.o'
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -Ie:\Python25\include -o
> sipl ib.o siplib.c
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -Ie:\Python25\include -o
> qtli b.o qtlib.c
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -Ie:\Python25\include -o
> thre ads.o threads.c
> gcc -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -Ie:\Python25\include -o
> objm ap.o objmap.c
> g++ -c -O2 -w -DUNICODE -DQT_LARGEFILE_SUPPORT -I. -Ie:\Python25\include -o
> bool .o bool.cpp
> g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import
> -Wl,-enable-runt ime-pseudo-reloc -shared -Wl,-subsystem,console -Wl,-s -o
> sip.pyd siplib.o qtlib .o threads.o objmap.o bool.o -Le:\Python25\libs
> -lpython25
> siplib.o:siplib.c:(.text+0x17): undefined reference to `_imp__PyType_Type'
> siplib.o:siplib.c:(.text+0x361): undefined reference to
> `_imp___Py_NoneStruct' siplib.o:siplib.c:(.text+0x369): undefined reference
> to `_imp___Py_NoneStruct' siplib.o:siplib.c:(.text+0x501): undefined
> reference to `_imp___Py_NoneStruct' siplib.o:siplib.c:(.text+0x509):
> undefined reference to `_imp___Py_NoneStruct'
> siplib.o:siplib.c:(.text+0x59a): undefined reference to
> `_imp__PyExc_RuntimeErro r'
> .........
>   qtlib.o:qtlib.c:(.text+0x1765): undefined reference to
> `_imp___Py_TrueStruct' qtlib.o:qtlib.c:(.text+0x176c): undefined reference
> to `_imp___Py_TrueStruct' threads.o:threads.c:(.text+0xc7): undefined
> reference to `_imp___Py_NoneStruct' threads.o:threads.c:(.text+0xcf):
> undefined reference to `_imp___Py_NoneStruct' collect2: ld returned 1 exit
> status
> mingw32-make[1]: *** [sip.pyd] Error 1
> mingw32-make[1]: Leaving directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-20 071228/siplib'
> mingw32-make: *** [all] Error 2
> mingw32-make: Leaving directory
> `E:/downloads/pythonAndQt/sip-4.7-snapshot-20071 228'

A possible problem is your version of MinGW (older versions required a special 
version of the Python library).

I only ever test with the version that the Qt Windows binary installs for you.

Phil


More information about the PyQt mailing list