undefined symbol: sipExportedExceptions_limacore
Phil Thompson
phil at riverbankcomputing.com
Mon Dec 1 13:30:49 GMT 2025
I can't reproduce this. Did you enable exceptions support in
pyproject.toml? See...
https://python-sip.readthedocs.io/en/stable/pyproject_toml.html#bindings-sections
Phil
On 01/12/2025 08:06, Laurent Claustre wrote:
> With sip 4 we got the good implementation in the generated c++ file:
>
> PyObject *sipExportedExceptions_limacore[2];
>
> But with sip 6 this is missing.
>
> On 12/1/25 08:10, Laurent Claustre wrote:
>> Sorry, the implementation is missing.
>>
>> On 11/28/25 17:28, Phil Thompson wrote:
>>> On 28/11/2025 16:07, Laurent Claustre wrote:
>>>> Hello,
>>>>
>>>> porting our C++ project python binding from sip 4.19 to 6.14 we got
>>>> the following error when importing the project module:
>>>>
>>>> /undefined symbol: sipExportedExceptions_limacore/
>>>>
>>>> Looking into the generated sipAPI project file (sipAPIlimacore.h)
>>>> sipExportedExceptions_limacore is declared as "external":
>>>>
>>>> //* The exceptions defined in this module. */
>>>> extern PyObject *sipExportedExceptions_limacore[];/
>>>>
>>>> But none of the .h/.cpp generated file contains its declaration. We
>>>> have a Exceptions.sip file which looks like:
>>>>
>>>> /enum Layer {
>>>> Common, Control, Hardware, CameraPlugin,
>>>> };
>>>>
>>>> enum ErrorType {
>>>> InvalidValue, NotSupported, Error,
>>>> };
>>>>
>>>>
>>>> %Exception Exception(SIP_Exception)
>>>> {
>>>> %TypeHeaderCode
>>>> #include "lima/Exceptions.h"
>>>> using namespace lima;
>>>> %End
>>>> %RaiseCode
>>>> const std::string& tmpString = sipExceptionRef.getErrMsg();
>>>> const char *detail = tmpString.c_str();
>>>> PyErr_SetString(sipException_Exception, detail);
>>>> %End
>>>> };
>>>> /
>>>>
>>>> Thanks for your help
>>>>
>>>> Laurent
>>>
>>> Compared to the 4.19 code is the declaration new or is the
>>> implementation missing?
>>>
>>> Phil
>>
More information about the PyQt
mailing list