[Qt] Link failure (undefined reference to `QFileDialog_selectFilter')
Laird
lairdshaw77 at gmail.com
Tue Dec 20 03:59:34 CET 2011
Hi,
Before asking for your help, I want to say to the author(s) of this Qt
interface for Lazarus: thank you for your time and effort, it's really
great to be able to compile Lazarus projects with a Qt widgetset.
Unfortunately, though, I can't quite compile them yet: after following
all the steps at
<http://wiki.lazarus.freepascal.org/Qt_Interface#Quick_start_guide_for_Linux>,
I'm still having problems - the linker complains about undefined
references. Here is the full set of error messages for the compilation
of a completely new project:
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /usr/share/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTFILEDIALOG__SETSELECTEDFILTER':
> /usr/share/lazarus/lcl/interfaces/qt/qtwidgets.pas:9702: undefined reference to `QFileDialog_selectFilter'
> /usr/share/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTFILEDIALOG__GETFILTERS':
> /usr/share/lazarus/lcl/interfaces/qt/qtwidgets.pas:9747: undefined reference to `QFileDialog_filters'
> project1.lpr(20,1) Error: Error while linking
> project1.lpr(20,1) Fatal: There were 1 errors compiling module, stopping
Any ideas on how to solve this problem?
In case it helps, I'm running Lazarus 0.9.30 on Gentoo Linux with Qt
version 4.7.2 and Qt4Pas version 2.4; I've compiled Qt4Pas from scratch
but the same problem occurred when I installed the pre-compiled
binaries. I've also created a symbolic link from libqt4intf.so to
libQt4Pas.so as the linker had been complaining that it couldn't find
-lqt4intf.
Cheers,
Laird
More information about the Qt
mailing list