[PyQt] Simple Examples for using SIP with PyQt5

Robert Kent rob at gulon.co.uk
Wed Aug 26 17:20:56 BST 2015


Hi All,

After my success of building a simple wrapper with SIP on *nix (MacOSX specifically) I’ve moved on to attempting it on Windows… with less success so far. I have (again) got a library to build cleanly (a .pyd file in this case) but when I attempt to load the module I get the following:

>>> import PyMyLabel
Traceback (most recent call last):
  File “(stdin)”, Line 1, in (module)
ImportError: DLL load failed: The specified procedure could not be found.

I have tried building the C++ library both statically and dynamically with the same result. I can link the library to a test C++ program, so I am once again forced to assume I am failing to link SIP generated library correctly. As the debug is less than helpful (which procedure?!) I was wondering if anyone has tried this and seen these symptoms before?

Any help would be greatly appreciated,

Cheers, Rob


> On 21 Aug 2015, at 16:24, Robert Kent <rob at gulon.co.uk> wrote:
> 
> Hi All,
> 
> As promised by me/suggested by David I have encapsulated my example and put it on GitHub:
> 
> https://github.com/jazzycamel/PyMyLabel <https://github.com/jazzycamel/PyMyLabel>
> 
> This is example contains an exceptionally thin wrapper around a QLabel with a configure script to generate the SIP wrapper as well as the Makefile’s necessary to build both the library itself and the Python module.
> 
> Hope it helps someone out, all comments and suggestions welcome.
> 
> Thanks, Rob
> 
>> On 21 Aug 2015, at 14:07, David Boddie <david at boddie.org.uk <mailto:david at boddie.org.uk>> wrote:
>> 
>> On Fri Aug 21 12:22:05 BST 2015, Robert Kent wrote:
>> 
>>> I may well write up my mini-example as a tutorial somewhere
>>> to help others as it really is easy to create PyQt extensions
>>> when you know how!
>> 
>> I put an example for PyQt4 on Bitbucket:
>> 
>> https://bitbucket.org/dboddie/pyqt-mailing-list-tempsip <https://bitbucket.org/dboddie/pyqt-mailing-list-tempsip>
>> 
>> Perhaps you could do something similar for your example.
>> 
>> David
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150826/f6f424da/attachment.html>


More information about the PyQt mailing list