[PyKDE] undefined symbol: QPrinter::setPrintRange

Patrick Stinson patrickkidd.lists at gmail.com
Tue May 23 05:52:28 BST 2006


Didn't you say that my example code didn't work for you? Any code that
uses that function should not link with the library in question.

On 5/22/06, Andreas Pakulat <apaku at gmx.de> wrote:
> On 22.05.06 16:33:04, Patrick Stinson wrote:
> > This happens because when you link objects into an executable, it
> > links all the functions used in your program (setPrintRange in my
> > example) to their implementations. If the trolltech build left out the
> > implementation of setPrintRage, the linker will not be able to find it
> > when I "request" it in my example.
> >
> > When you import a python module like PyQt4.QtGui it does the same
> > thing for all of the functions referenced in the module's code. This
> > is called dynamic, or run-time linking. The pyqt4 code generated by
> > sip references every function in the qt library (that is wrapped,
> > anyway), so when you import it, the linker binds (or links!) the
> > function reference (generated by sip in the python module) to the
> > actual binary data representing the function block (in the qt
> > library).
>
> Well, that is all pretty clear, however what I don't understand is: why
> does compiling PyQt4 fail for you but not for me... Or did I overlook
> something in the errors you sent?
>
> Andreas
>
> --
> You may be gone tomorrow, but that doesn't mean that you weren't here today.
>
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>


-- 
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/




More information about the PyQt mailing list