[Qt-interest] Errors building PythonQt

Daniel França daniel.franca at gmail.com
Tue Jan 24 18:16:01 CET 2012


Hi all,
I'm having a lot of trouble building PythonQt on Mac OS X (Snow Leopard)
Fist, it was working fine, and I've compiled it against Qt4.7 (Long time
ago and I don't remember if I changed something at the PythonQt code :/ )

Now, after some problems with 2 Qt libraries installed (one as dylib and
other as framework) I decided to install Qt4.8, I did it, and removed qt
dylib (manually, I don't know if this may cause some problems :( )

Then I start to try to build PythonQt again... against Qt4.8....
and I'm on this about 2 days :(
First I got this error: moc_PythonQtStdDecorators.cpp: In static member
function 'static void PythonQtStdDecorators::qt_static_metacall(QObject*,
QMetaObject::Call, int, void**)':

moc_PythonQtStdDecorators.cpp:152: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:153: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:154: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:155: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:156: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:157: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:158: error: expected unqualified-id before
'(' token

moc_PythonQtStdDecorators.cpp:159: error: expected unqualified-id before
'(' token


So I commented those lines on moc file to try to at least understand the
problem.... and then I got these link errors(I copied just some few,
because there are a lot):

PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QCursor,
std::allocator<QCursor> >, QCursor>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QVector<QBitmap>,
QBitmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QList<QBitmap>,
QBitmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QBitmap,
std::allocator<QBitmap> >, QBitmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QRegion,
std::allocator<QRegion> >, QRegion>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QVector<QImage>,
QImage>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QList<QImage>,
QImage>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QImage,
std::allocator<QImage> >, QImage>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QIcon,
std::allocator<QIcon> >, QIcon>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QPalette,
std::allocator<QPalette> >, QPalette>(_object*, void*, int, bool)in
PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QColor,
std::allocator<QColor> >, QColor>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QBrush,
std::allocator<QBrush> >, QBrush>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QPixmap,
std::allocator<QPixmap> >, QPixmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QVector<QPixmap>,
QPixmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<QList<QPixmap>,
QPixmap>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QFont,
std::allocator<QFont> >, QFont>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QRegExp,
std::allocator<QRegExp> >, QRegExp>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QLocale,
std::allocator<QLocale> >, QLocale>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QUrl,
std::allocator<QUrl> >, QUrl>(_object*, void*, int, bool)in PythonQt.o

bool PythonQtConvertPythonListToListOfValueType<std::vector<QDateTime,
std::allocator<QDateTime> >, QDateTime>(_object*, void*, int, bool)in
PythonQt.o

PythonQtConv::PyObjToStringList(_object*, bool, bool&)in
PythonQtConversion.o

PythonQtConv::PyObjToQVariant(_object*, int) in PythonQtConversion.o

PythonQtConv::ConvertPythonListToQListOfPointerType(_object*,
QList<void*>*, QByteArray const&, bool)in PythonQtConversion.o

"_PyErr_Print", referenced from:

PythonQt::handleError() in PythonQt.o

"_PyRun_StringFlags", referenced from:

PythonQt::evalScript(_object*, QString const&, int)in PythonQt.o

PythonQtScriptingConsole::executeCode(QString const&) in
PythonQtScriptingConsole.o

ld: symbol(s) not found


The lines in .pro file that points to the Phython development library:

LIBS += -F/Library/Frameworks/ -framework Python

 INCLUDEPATH +=
/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7

DEPENDPATH +=  /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7


The Python Library exists in /Library/Frameworks/Python.framework/

I tried to remove the original paths, add it via Qt Creator... and
nothing changes :(

I don't know what else I can try to solve this =/


I've thought to change to another library, but for what I want (extend
an C++/Qt application using Python) I think PythonQt is the best
option.

Unfortunately there's so little documentation about this. =/


Anyone can help me?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20120124/e81a900d/attachment.html 


More information about the Qt-interest-old mailing list