Hi,
very interesting bug. Basically FreeCAD should also work together with 4.5.x, of course.
During the configure a small Qt test application is created which should return the version number. For any reason this test application isn't correctly built and when trying to start it the message "undefined symbol: _Z13qFlagLocationPKc" comes up. Would be interesting what library is missing here.
The source code of the test application is:
myqt.h
Code: Select all
#include <QObject>
class Test : public QObject
{
Q_OBJECT
public:
Test() {}
~Test() {}
public slots:
void receive() {}
signals:
void send();
};
myqt.cpp
Code: Select all
#include "myqt.h"
#include <QCoreApplication>
#include <QByteArray>
#include <QGlobalStatic>
#include <QStringList>
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char **argv )
{
QCoreApplication app( argc, argv );
Test t;
QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );
// major, minor, patch
QString version = "$min_qt_version";
QStringList numbers = version.split('.');
int shift[[3]] = {16,8,0};
int minversion = 0, i = 0;
for (QStringList::ConstIterator it = numbers.begin(); it != numbers.end(); ++it, ++i) {
bool ok;
int val = (*it).toInt(&ok);
if (ok) {
minversion = minversion + (val << shift[[i]]);
}
}
exit(QT_VERSION < minversion);
}
To build the application follow these steps:
* moc myqt.h -o moc_myqt.cpp
* g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -c -g -O2 -o moc_myqt.o moc_myqt.cpp
* g++ -I/usr/local/Trolltech/Qt-4.5.2/include -I/usr/local/Trolltech/Qt-4.5.2/include/QtCore -c -g -O2 -o myqt.o myqt.cpp
* g++ -L/usr/local/Trolltech/Qt-4.5.2/lib -lQtCore -o myqt myqt.o moc_myqt.o
* ./myqt
If it fails then add the other Qt libs step by step. If it works please tell me which one this is.
Cheers,
Werner