qt support lazarus / 1-Linux ---------------------------------------------------------------------- miwa · 2009-12-19 22:59 Hello. Just installed lazarus on kubuntu 9.04 from repos as described here It works perfectly with default gtk engine, but won't to rebuild itself using qt. I've downloaded FPC Qt4 Binding lib (binary, not source), updated ldconfig and made "make" command in lcl/interfaces/qt directory. So, now when i try to rebuild lazarus, i get error while linking "hello.pp" file (nice joke, hm). Error list looks like this: Code: [Select]/usr/lib/lazarus/0.9.28.2/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTFILEDIALOG__SETSELECTEDFILTER': qtwidgets.pas:9702: undefined reference to `QFileDialog_selectFilter' /usr/lib/lazarus/0.9.28.2/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTFILEDIALOG__GETFILTERS': qtwidgets.pas:9747: undefined reference to `QFileDialog_filters' /usr/lib/lazarus/0.9.28.2/examples/hello.pp(31,1) Error: Error while linking Zeljan Rikalo says here that it's not a bug, but feature ) So the question is - do i have to rebuild libqt4intf.so from sources with dUSE_QT_44 (or 45?) option? And why this one is not included in binary from offpage? And - more generally - would be a good idea to include this lib into default package or dependencies in repos? P.S. And in general lazarus become very user-friendly during last two years. Great job was done. ---------------------------------------------------------------------- alter · 2009-12-20 00:04 Recompile Lazarus with -dUSE_QT_44 or -dUSE_QT_45. Qt 4.3 support has been dropped if I remember correctly ---------------------------------------------------------------------- miwa · 2009-12-20 08:57 So, problem is in lazarus, not libqt4intf.so? I just don't like to recompile software in debian or ubuntu, so i don't do it without very serious reasons. ---------------------------------------------------------------------- zeljko · 2010-01-04 19:09 Quote from: miwa on December 19, 2009, 11:59:45 pmZeljan Rikalo says here that it's not a bug, but feature ) Please do not misinterpret my observations. I didn't say it's feature, I said that it's A MUST. qt-lcl is still marked as beta, so nobody guarantee that anything should work. If you use 0.9.28.2 with qt-4.5 then YOU MUST use -dUSE_QT_45, lazarus 0.9.29 svn does not need such defines anymore - qt-4.5 is default. ---------------------------------------------------------------------- Troodon · 2010-01-04 19:20 Quote from: zeljko on January 04, 2010, 08:09:41 pmIf you use 0.9.28.2 with qt-4.5 then YOU MUST use -dUSE_QT_45 I tried using -dUSE_QT_45 with 0.9.28.2/2.2.4 on Ubuntu 9.10 (Qt-4.5.3 is default), I even rebuilt the library from source (including libqt4intf.so), and it doesn't work: the LCL (re)builds fine but linking fails with the error messages indicated at the beginning of this thread. Besides, I don't see why one should have to rebuild Lazarus to create Qt-4.5 applications; setting the qt widget in the compiler options should suffice. It used to be easier with Qt-4.3.... Another issue is that there are no FPC 2.3.x or 2.4.x .deb packages for Lazarus 0.9.29 to test against. ---------------------------------------------------------------------- zeljko · 2010-01-04 20:15 Quote from: Troodon on January 04, 2010, 08:20:30 pmI tried using -dUSE_QT_45 with 0.9.28.2/2.2.4 on Ubuntu 9.10 (Qt-4.5.3 is default), I even rebuilt the library from source (including libqt4intf.so), and it doesn't work: the LCL (re)builds fine but linking fails with the error messages indicated at the beginning of this thread. Besides, I don't see why one should have to rebuild Lazarus to create Qt-4.5 applications; setting the qt widget in the compiler options should suffice. It used to be easier with Qt-4.3.... Another issue is that there are no FPC 2.3.x or 2.4.x .deb packages for Lazarus 0.9.29 to test against. we'll then you have problem with bindings.What version of qt bindings (libqt4intf) you have ? ---------------------------------------------------------------------- Troodon · 2010-01-04 20:29 Quote from: zeljko on January 04, 2010, 09:15:50 pmwe'll then you have problem with bindings.What version of qt bindings (libqt4intf) you have ? I (re)built libqt4intf.so using qt4pas-V1.72_Qt4.5.2.tar.gz and the Ubuntu 9.10 Qt-4.5.3 sources. I get the same linking error with and without -dUSE_QT_45. ---------------------------------------------------------------------- zeljko · 2010-01-05 09:07 Quote from: Troodon on January 04, 2010, 09:29:25 pmI (re)built libqt4intf.so using qt4pas-V1.72_Qt4.5.2.tar.gz and the Ubuntu 9.10 Qt-4.5.3 sources. I get the same linking error with and without -dUSE_QT_45. Then it's obvious why you have such errors. Such combination can be used with 0.9.29 svn only, since I've removed -dUSE_QT_XX defines and Qt-4.5 is default. 0.9.28.2 is last lazarus version which can be used to recompile against qt-4.3,qt-4.4 and qt-4.5 (qt-4.3 IS DEFAULT or -dUSE_QT_44 or -dUSE_QT_45). So you have to download bindings <= 1.71 (NOT 1.72) and then recompile with proper defines (-dUSE_QT_45), also here http://users.telenet.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html you can read about changes between 1.71 and 1.72. ---------------------------------------------------------------------- Troodon · 2010-01-05 16:51 Quote from: zeljko on January 05, 2010, 10:07:24 amSo you have to download bindings <= 1.71 (NOT 1.72) and then recompile with proper defines (-dUSE_QT_45) Yes, now linking completes without errors. Thanks! ---------------------------------------------------------------------- zeljko · 2010-01-05 22:15 Glad to hear that