[Qt] Linking error with Lazarus Qt on Mac OS X 10.5

Den Jean Den.Jean at telenet.be
Fri Dec 19 22:06:23 CET 2008


On Friday 19 December 2008 08:22:44 Stephane Carre wrote:
> I have Lazarus (Carbon, latest snapshot) installed on Mac OS X 10.5, and
> managed to successfully recompile the LCL for Qt.
Which Qt?
--------------
Which Qt do you have installed ? Qt4.4.X or Qt4.3.X ?
When in doubt, remove Qt and install latest Qt 4.4.X

Corresponding Interface Binary:
------------------------------------------
The pascal to Qt interface (/Frameworks/Qt4Intf.framework/Qt4Intf)
can be downloaded from 
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html
For Qt 4.4.X there is a binary available, for Qt 4.3.X you need to compile the 
interface library yourself. Download the source and follow the instructions.
If these are not clear or incorrect, please report and it will be improved.

Compiling Lazarus:
-------------------------
see http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html
Qt 4.4.X : with -dUSE_QT_44
make clean all LCL_PLATFORM=qt OPT="-dUSE_QT_44 -k'-framework' -k'Qt4Intf' -
k'-lobjc' -k'-framework' -k'Foundation'"

Qt 4.3: without -dUSE_QT_44
make clean all LCL_PLATFORM=qt OPT="-k'-framework' -k'Qt4Intf' -k'-lobjc' -k'-
framework' -k'Foundation'"


compile applications: You need set the same "linker" options passed 
in the previous commandlines in the lazarus compile options dialogs.

Lazarus ->  Project -> Compiler Options -> Linking page -> Options (-k):
-framework Qt4Intf -lobjc -framework Foundation


> Undefined symbols:
>   "_QFileDialog_filters", referenced from:
>       _QTWIDGETS_TQTFILEDIALOG_$__GETFILTERS$QSTRINGLISTH in qtwidgets.o
> ld: symbol(s) not found
> An error occurred while linking
> Error: Error while linking

Means you compiled lazarus without define USE_QT_44 and that the symbol 
(in this case the procedure QFileDialog_filters) was not resolved (not found 
in any libraries on your system)

Please read 
http://wiki.lazarus.freepascal.org/Qt_Interface_Mac
and report or fix mistakes. 

kind regards,

Den Jean





More information about the Qt mailing list