[Interest] Problem compiling boost::python code in Qt
Richard Öhlinger
r.oehlinger at avibit.com
Thu Sep 29 08:48:04 CEST 2016
On 09/29/2016 05:54 AM, Kapil Gupta wrote:
> I am using Boost::python for access to python code from c++.
> When I included the `PythonLibs` and Boost::Python into my code, I
> started having this error:
>
> ```
> /usr/include/python3.5m/object.h:445:23: error: expected
> unqualified-id before ‘;’ token
> PyType_Slot *slots; /* terminated by slot==0. */
>
I think you are encountering a name clash with Qt "keywords" which are
macro definitions in C++:
much like: #define slots
For how to avoid see:
http://doc.qt.io/qt-5/signalsandslots.html#using-qt-with-3rd-party-signals-and-slots
-richard
More information about the Interest
mailing list