View Single Post
  #1   (View Single Post)  
Old 2nd May 2008
enpey enpey is offline
Port Guard
 
Join Date: May 2008
Location: Newcastle, Australia
Posts: 33
Default Getting Qt4 to work on FreeBSD

I have installed devel/qt4 and am trying to compile the simple "Hello Qt!" beginner.I have installed all from ports, but cannot find anything in relation to installation other than I need to set a few environment variables...

If I leave QTDIR empty, when running '$ qmake hello.pro' I now do not receive a long line of QFile:pen: errors. In my Makefile I have set absolute paths for MOC and UIC (/usr/local/bin/moc-qt4 or uic-qt4) and I am now receiving this error:
Quote:
$ make
c++ -c -pipe -Wall -W -O2 -fno-strict-aliasing -pipe -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/local/share/qt/mkspecs/freebsd-g++ -I. -I. -I../../../../../local/include -I/include -o moc_qapplication.o ../../../../../local/include/Qt/moc_qapplication.cpp
../../../../../local/include/Qt/moc_qapplication.cpp: In member function 'virtual int QApplication::qt_metacall(QMetaObject::Call, int, void**)':
../../../../../local/include/Qt/moc_qapplication.cpp:106: error: invalid use of incomplete type 'struct QApplicationPrivate'
../../../../../local/include/QtCore/qobject.h:285: error: forward declaration of 'struct QApplicationPrivate'
../../../../../local/include/Qt/moc_qapplication.cpp:115: error: invalid use of incomplete type 'struct QIcon'
../../../../../local/include/Qt/qapplication.h:72: error: forward declaration of 'struct QIcon'
*** Error code 1

Stop in /usr/home/np/docs/.code/hello.

I found this http://lists.trolltech.com/qt-jambi...ead00008-0.html but I am unsure of its relevance as I have not installed qt3 (Except for package dependencies such as linux-opera). Could qt3 library interference be affecting my results?

If I '$ export QTDIR=/usr/local/share/qt4; qmake hello.pro' I get a long long list of QFile:pen errors followed by some other errors, but still end up with a Makefile. It still gives me the same errors as outlined above.

With QTDIR set, and running 'qmake hello.pro' these are the errors I get:
Quote:
QFile::open: No file name specified
.
.
.
QFile::open: No file name specified
QFile::open: No file name specified
qt_config.prf:8: Unknown test function: debug
qt_functions.prf:1: Unknown test function: defineReplace
qt_functions.prf:18: Unknown test function: defineTest
QFile::open: No file name specified
QFile::open: No file name specified
qt_config.prf:8: Unknown test function: debug
qt_functions.prf:1: Unknown test function: defineReplace
qt_functions.prf:18: Unknown test function: defineTest
.
.
.
$
Anyone have any ideas on what I might be able to do to get it working?

Thanks, enpey
Reply With Quote