Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2009-01

My account and problems with lazarus/ qt embedded

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Patrick Dohrmann

Hi,

i have already subscribeded correctly to your mailing list twice and posted several times, but i only got a automatic generated mail response saying that i am unknown to the mailing list and that my post maybe gets published or i will be ignored by the lists admin. But all means a further reply on that mail held off.

I need help with my problem and nobody can help me. It seems even not the providers of the binding =/ Sorry I have to say that, but no response in a month is a bit slow, because the mailing list seems to be used everyday as i can see.

I'd like to use qt/embedded for lazarus on my i386 Linux Ubuntu/Gutsy. Qt/Embedded is needed because i would like to use the framebuffer and not the xServer.
Unfortunately something has gone wrong. I downloaded and installed/made Qt/Embedded, Lazarus (svn, latest), FPC (sourceforge, latest), binding for qt/embedded (compiled sources and generated a libqt4intf.so, copied to usr/local/lib, ran ldconfig ...).

At the time i build lazarus using "make clean all LCL_PLATFORM=qt OPT='-dUSE_QT_44'" i get:
/opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOW':
qtwidgets.pas:2708: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWNORMAL':
qtwidgets.pas:2719: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWMINIMIZED':
qtwidgets.pas:2730: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWMAXIMIZED':
qtwidgets.pas:2741: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SETVISIBLE':
qtwidgets.pas:3000: undefined reference to `qtx11waitforwindowmanager' /usr/bin/../lib/libqt4intf.so: undefined reference to `QGridLayout::itemAtPosition(int, int) const'
/usr/bin/../lib/libqt4intf.so: undefined reference to `QPrintPreviewWidget::setViewMode(QPrintPreviewWidget::ViewMode)' /usr/bin/../lib/libqt4intf.so: undefined reference to `QLocale::toDate(QString const&, QLocale::FormatType) const' /usr/bin/../lib/libqt4intf.so: undefined reference to `QFileDialog::setNameFilterDetailsVisible(bool)'
/usr/bin/../lib/libqt4intf.so: undefined reference to `QStyledItemDelegate::QStyledItemDelegate(QObject*)' ...
and so on
...
make[2]: *** [lazarus] Fehler 1
make[1]: *** [ide] Fehler 2
make: *** [ide] Fehler 2

I used the installation guide on the Lazarus wiki and a "nice tutorial" (link provided in first mail of december). Both guides are quite similar.

What can I possibly have done wrong or is there something with the linker?

I would be thankful for a response not generated by an automatic mailinglist program.

Kindly regards,
Patrick

zeljko
to Patrick Dohrmann
Patrick Dohrmann wrote 15 lines
/opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOW': qtwidgets.pas:2708: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWNORMAL': qtwidgets.pas:2719: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWMINIMIZED': qtwidgets.pas:2730: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SHOWMAXIMIZED': qtwidgets.pas:2741: undefined reference to `qtx11waitforwindowmanager' /opt/lazarus/lcl/units/i386-linux/qt/qtwidgets.o: In function `TQTWIDGET__SETVISIBLE': qtwidgets.pas:3000: undefined reference to `qtx11waitforwindowmanager'

This is a bug in qtwidgets IFDEF's (it's linux but should be something else (BINUX ? Den ?). Please fill bugreport.

Den Jean
to Patrick Dohrmann: i have already subscribeded correctly to your mailing list twice and posted several…
Patrick Dohrmann wrote
I need help with my problem and nobody can help me. It seems even not the providers of the binding =/ Sorry I have to say that, but no response in a month is a bit slow, because the mailing list seems to be used everyday as i can see.

?! I responded with 2 mails,
within 2 hours after your mail. (6 Nov, 18Hr)
I do not find any feedback nor any new question.
:-(

Patrick Dohrmann
to Den Jean

I see and got no response to that mail. thats why i am asking again and being so unsatisfied...by the way today seems to be the first day i can write to this mailinglist. so if you mean the mail i send you in private: nothing had worked.
nothing found in any tutorials helped me. therfore i set up a clean installation of ubuntu/gutsy with latest fpc, lazarus, qt/embedded. tried the tutorials and all i get is the linker error mailed earlier.

Show quoted text 19 lines
On Sunday 04 January 2009 13:48:43 Patrick Dohrmann wrote: > I need help with my problem and nobody can help me. It seems even not > the providers of the binding =/ Sorry I have to say that, but no > response in a month is a bit slow, because the mailing list seems to be > used everyday as i can see. > ?! I responded with 2 mails, within 2 hours after your mail. (6 Nov, 18Hr) I do not find any feedback nor any new question. :-( _______________________________________________ Qt mailing list http://www.lazarus.freepascal.org/mailman/listinfo/qt
Den Jean
to Patrick Dohrmann: i have already subscribeded correctly to your mailing list twice and posted several…
Patrick Dohrmann wrote
Unfortunately something has gone wrong. I downloaded and installed/made Qt/Embedded, Lazarus (svn, latest), FPC (sourceforge, latest), binding for qt/embedded (compiled sources and generated a libqt4intf.so, copied to usr/local/lib, ran ldconfig ...).

Lazarus LCL/Qt-embedded running on qvfb:
http://users.telenet.be/Jan.Van.hijfte/qtforfpc/qvfb_lazarus.png

Qt:
===
downloaded, untarred in /somedir, configured &
compiled qt-x11 and qt-embedded. (may take a couple of minutes :-)

x11: ./configure -prefix `pwd` -opengl -xrender -xcursor -xrandr -qvfb embedded:./configure -prefix `pwd` -qvfb

qvfb:
====
after compilation, x11-qt should contain qvfb in subdir bin. run qvfb

FPC Qt4 Binding:
=============
cd /somedir
tar zxvf qtopia_qt4pas-V1.68_Qt4.4.3.tar.gz
cd qt4pas-V1.68_Qt4.4.3/
export LD_LIBRARY_PATH=/somedir/qt-embedded-linux-opensource-src-4.4.3/lib sh compile_lib_qtopia.sh i386
cp libqt4intf.so /somedir/qt-embedded-linux-opensource-src-4.4.3/lib

Lazarus:
=======
cd /svn/lazarus
export LD_LIBRARY_PATH=/somedir/qt-embedded-linux-opensource-src-4.4.3/lib make PREFIX=/usr clean all LCL_PLATFORM=qt OPT="-dUSE_QT_44 -dQTOPIA" ./lazarus -qws

Note how the define QTOPIA solved your problem
http://wiki.lazarus.freepascal.org/index.php/Qt_Interface#Conditional_defines_accepted_by_the_Qt_Interface http://wiki.lazarus.freepascal.org/LCL_Defines#Qt_defines http://wiki.lazarus.freepascal.org/Qt4_binding#Supported_Platforms

regards,

Den Jean

Den Jean
to zeljko: This is a bug in qtwidgets IFDEF's (it's linux but should be something else (BINUX ? Den…
zeljko wrote
This is a bug in qtwidgets IFDEF's (it's linux but should be something else (BINUX ? Den ?). Please fill bugreport.

no bug, you already solved it some time ago by adding IFNDEF QTOPIA. I define BINUX in qt4.pas, but the scope of that define remains there.

svn blame qtwidgets.pas | grep -i -B3 waitfor
16818 zeljko {$IFNDEF QTOPIA}
16645 zeljko {$IFDEF LINUX}
16645 zeljko if QWidget_isWindow(Widget) then 16645 zeljko QtX11WaitForWindowManager(Widget);

Your IFDEF linux is a bit too strict, the *BSD are in the cold that way. But if you would use BINUX, you would need to add -dBINUX on linux or *BSD to compile lazarus/lcl

But the best solution is perhaps, if you would extend qtdefines.inc to include the definition of BINUX using the fpc defines LINUX and BSD (copy setup of qt4.pas)

QTOPIA is set automatically with fpc define arm, but for qt-embedded on i386 framebuffer, it will always need to be set manually (-dQTOPIA) -> this is already in comments sometime in qt4.pas

regards,

Den Jean

Vincent Snijders
to Den Jean
Den Jean wrote 21 lines
On Sunday 04 January 2009 14:18:53 zeljko wrote: > This is a bug in qtwidgets IFDEF's (it's linux but should be something else > (BINUX ? Den ?). Please fill bugreport. no bug, you already solved it some time ago by adding IFNDEF QTOPIA. I define BINUX in qt4.pas, but the scope of that define remains there. svn blame qtwidgets.pas | grep -i -B3 waitfor 16818 zeljko {$IFNDEF QTOPIA} 16645 zeljko {$IFDEF LINUX} 16645 zeljko if QWidget_isWindow(Widget) then 16645 zeljko QtX11WaitForWindowManager(Widget); Your IFDEF linux is a bit too strict, the *BSD are in the cold that way. But if you would use BINUX, you would need to add -dBINUX on linux or *BSD to compile lazarus/lcl But the best solution is perhaps, if you would extend qtdefines.inc to include the definition of BINUX using the fpc defines LINUX and BSD (copy setup of qt4.pas)

I don't know if this is relevant, but AFAIK, BSD is also defined for darwin (Mac OS X).

Vincent

Den Jean
to Vincent Snijders
Vincent Snijders wrote
I don't know if this is relevant, but AFAIK, BSD is also defined for darwin (Mac OS X).
this is accounted for, see extract of qt4.pas
.......
{$IFDEF MSWINDOWS}
  QtIntf = 'libqt4intf.dll';
{$ENDIF}
// Set qtopia yourself if using QTOPIA with QVFB on i386
// ppc386 -dQTOPIA
{$IFDEF CPUARM}
  {$DEFINE QTOPIA}
{$ENDIF}
{$IFDEF QTOPIA}
  QtIntf = 'libqt4intf.so';
{$ENDIF}
{$IFNDEF QTOPIA}
  {$IF DEFINED(LINUX) or DEFINED(FREEBSD) or DEFINED(NETBSD)}
    {$DEFINE BINUX}
    QtIntf = 'libqt4intf.so';
  {$ENDIF}
{$ENDIF}
{$IFDEF DARWIN}
  QtIntf = '';
{$ENDIF}
.........