[PyQt] SIP default constructor issue

Kelvin Rodriguez kr788 at nau.edu
Sat Feb 4 01:31:42 GMT 2017


Hi all,


I am trying to wrap fairly large C++ api using SIP. In trying to build the
module, I get the error:


./sipbundleIsisBundleImage.cpp: In function ‘void*
array_Isis_BundleImage(Py_ssize_t)’:

./sipbundleIsisBundleImage.cpp:86:43: error: no matching function for call
to ‘Isis::BundleImage::BundleImage()’

    return new Isis::BundleImage[sipNrElem];


We do not user the default contractor in our codebase, so one does exist
for the class BundleImage. It seems like SIP requires there to exist a
default constructor for the wrapped class? This can be fixed easily by
adding a default contractor to the C++ class being wrapped, but I would
like to avoid it if possible.


My questions are: Does SIP allow for a clean way to eliminate this error
without changing the codebase being wrapped? Does SIP actually require a
default constructor or is there something I am doing wrong?


The .sip for bundle Image is as barebones as the class:


namespace Isis {

 class BundleImage {

 %TypeHeaderCode

   #include "BundleImage.h"

 %End


 public:


   QString serialNumber();

   QString fileName();

 };

};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170203/67678981/attachment-0001.html>


More information about the PyQt mailing list