This falls into basic compiler/linker theory. 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). The C++ qt code containing QPrinter::setPrintRange was never linked into the library, therefore it is a problem with their build system, and has nothing to do with pyqt, and subsequently, Phil. On 5/22/06, Andreas Pakulat <[EMAIL PROTECTED]> wrote:
On 22.05.06 14:36:54, Patrick Stinson wrote: > On 5/22/06, Patrick Stinson <[EMAIL PROTECTED]> wrote: > >Hmm. I don't find PyQt4 to even come into the picture here, as the > >following code shows the same error whne compiled w/o qt3 support. Well, my gcc is happily linking PyQt4 against the Qt4 with no qt3 support, however it doesn't link your example and I also get the missing symbol when I try to import QtGui... I have no idea why this happens, see my reply to Phil for information about my "build system"... Andreas -- You will probably marry after a very brief courtship. _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
-- Patrick Kidd Stinson http://www.patrickkidd.com/ http://pkaudio.sourceforge.net/ http://pksampler.sourceforge.net/ _______________________________________________ PyKDE mailing list [email protected] http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
