<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>porting our C++ project python binding from sip 4.19 to 6.14 we
got the following error when importing the project module:</p>
<p><font size="2"><i>undefined symbol:
sipExportedExceptions_limacore</i></font></p>
<p>Looking into the generated sipAPI project file (sipAPIlimacore.h)
sipExportedExceptions_limacore is declared as "external":</p>
<p><i><font size="2">/* The exceptions defined in this module. */<br>
extern PyObject *sipExportedExceptions_limacore[];</font></i></p>
<p>But none of the .h/.cpp generated file contains its declaration.
We have a Exceptions.sip file which looks like:</p>
<p><i><font size="2">enum Layer {<br>
Common, Control, Hardware, CameraPlugin,<br>
};<br>
<br>
enum ErrorType {<br>
InvalidValue, NotSupported, Error,<br>
};<br>
<br>
<br>
%Exception Exception(SIP_Exception)<br>
{<br>
%TypeHeaderCode<br>
#include "lima/Exceptions.h"<br>
using namespace lima;<br>
%End<br>
%RaiseCode<br>
const <a class="moz-txt-link-freetext" href="std::string&">std::string&</a> tmpString =
sipExceptionRef.getErrMsg();<br>
const char *detail = tmpString.c_str();<br>
PyErr_SetString(sipException_Exception, detail);<br>
%End<br>
};</font><br>
</i><br>
</p>
<p>Thanks for your help</p>
<p>Laurent</p>
<pre class="moz-signature" cols="72">--
Laurent Claustre
Beamline Control Unit
Instrumentation Services and Development Division
ESRF - The European Synchrotron
71, avenue des Martyrs
38000 Grenoble, FRANCE
Tel.: +33 (0)4.76.88.29.12</pre>
</body>
</html>