Build application with Linux Qt embedded lazarus / 31-LCL ---------------------------------------------------------------------- fsvictor · 2015-12-28 08:10 Hi, All I am going to build an application on ARM Linux+Embedded Qt with Lazarus. So I first build libQt4Pas.so with compiler conditional directive 'QTOPIA'. After libQt4Pas.so was built, I need to build lazarus LCL with the same directive 'QTOPIA' to remove the dependence of X11, but I got errors here, as below: Free Pascal Compiler version 2.6.4 [2015/05/20] for arm Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling ..\lcl.pas Compiling alllclintfunits.pas Compiling qtint.pp qtobject.inc(243,45) Error: Identifier not found "QApplication_hook_hook_commitDataRequest" qtobject.inc(245,44) Error: Identifier not found "QApplication_hook_hook_saveStateRequest" qtobject.inc(1153,39) Error: Identifier not found "QSessionManager_allowsInteraction" qtobject.inc(1161,29) Error: Identifier not found "QSessionManager_cancel" qtobject.inc(1170,30) Error: Identifier not found "QSessionManager_release" qtwinapi.inc(1379,8) Note: User defined: remove ifdef if I'm wrong about DT_WORDBREAK OBSERVATION qtwinapi.inc(1440,4) Warning: User defined: HARDCODED WORKAROUND for qt-4.7.1 QPainter bug. qtwinapi.inc(2251,6) Warning: User defined: workaround for Qt-4.8.XX bug (test with 4.8.3 release) ! qtint.pp(528) Fatal: There were 5 errors compiling module, stopping Fatal: Compilation aborted make[2]: *** [../lcl.ppu] Error 1 make[2]: Leaving directory `e:/lazarus/lcl/interfaces/qt' make[1]: *** [qt_all] Error 2 make[1]: Leaving directory `e:/lazarus/lcl/interfaces' make: *** [interfaces] Error 2 I looked into qtobject.inc, here is the error place: qtobject.inc(243,45) Error: Identifier not found "QApplication_hook_hook_commitDataRequest" qtobject.inc(245,44) Error: Identifier not found "QApplication_hook_hook_saveStateRequest" --------------------------------------   if not FIsLibraryInstance then   begin     {$IFDEF HAIKU}     FAppSessionQuit := nil;     FAppSaveSessionRequest := nil;     {$ELSE}     FAppSessionQuit := QApplication_hook_create(App);     QApplication_hook_hook_commitDataRequest(FAppSessionQuit, @SlotCommitDataRequest);     FAppSaveSessionRequest := QApplication_hook_create(App);     QApplication_hook_hook_saveStateRequest(FAppSaveSessionRequest, @SlotSaveDataRequest);     {$ENDIF}   end else   begin     FAppSessionQuit := nil;     FAppSaveSessionRequest := nil;   end; -------------------------------------- qtobject.inc(1153,39) Error: Identifier not found "QSessionManager_allowsInteraction" qtobject.inc(1161,29) Error: Identifier not found "QSessionManager_cancel" qtobject.inc(1170,30) Error: Identifier not found "QSessionManager_release" -------------------------------------- {$IFDEF QTDEBUGSESSIONMANAGER}   DebugLn('TQtWidgetSet.SlotCommitDataRequest allowInteraction ? ',dbgs(QSessionManager_allowsInteraction(sessionManager)),     ' errorInteraction ',dbgs(QSessionManager_allowsErrorInteraction(sessionManager)),     ' phase2 ',dbgs(QSessionManager_isPhase2(sessionManager)));   {$ENDIF}   {$IFNDEF HAIKU}   // if session manager does not allow interaction, then we close app without any intf calls   if QSessionManager_allowsInteraction(sessionManager) then   begin     Application.IntfQueryEndSession(ACancel);     if ACancel then     begin       {$IFDEF QTDEBUGSESSIONMANAGER}       DebugLn('*** App shutdown cancelled ...***');       {$ENDIF}       QSessionManager_cancel(sessionManager);     end else     begin       Application.IntfEndSession;       QApplication_hook_destroy(FAppSessionQuit);       FAppSessionQuit := nil;       {$IFDEF QTDEBUGSESSIONMANAGER}       DebugLn('*** App shutdown releasing sessionManager ...***');       {$ENDIF}       QSessionManager_release(sessionManager);     end;   end;   {$ENDIF} -------------------------------------- The other errors were similar, it seems this source file, qtobject.inc, does not know the conditional directive 'QTOPIA'. When the libQt4Pas.so is compiled with 'QTOPIA', it will not have such function as QApplication_hook_hook_commitDataRequest, QApplication_hook_hook_saveStateRequest, etc. My lazarus version is 1.4.4, and I check the source in trunk of SVN, is seems this problem is still remain. Is it a bug? If so, is any plan to fix it? ---------------------------------------------------------------------- mica · 2016-01-02 12:48 Tested it with the same Result. Using QT without X11 seems not to be possible with Lazarus. ---------------------------------------------------------------------- zeljko · 2016-01-08 12:40 What's missing ? QTOPIA does not have sessionManager and other stuff ? ---------------------------------------------------------------------- mica · 2016-01-10 17:35 qtopia is using framebuffer according to http://wiki.lazarus.freepascal.org/Qt4_binding#Supported_Platforms it should be possible to compile Lazarus to the qtopia Target make PREFIX=/usr clean all LCL_PLATFORM=qt OPT="-dQTOPIA" but you get the mentioned Errors ---------------------------------------------------------------------- mica · 2016-01-12 20:41 ok then someone remove the qtopia entry in the wiki since its seems not to be possible or no one seems to maintain it. ---------------------------------------------------------------------- zeljko · 2016-01-12 20:57 No, I'll fix it as soon as I back home...in next 7-12 days... pls open an issue about it so it won't be forgotten ---------------------------------------------------------------------- mica · 2016-01-12 21:13 thanks http://bugs.freepascal.org/view.php?id=29379 dont hurry, if its not possible its no problem. I only want correct Information in Wiki and Release Info so no Newcomer is disappointed. ---------------------------------------------------------------------- zeljko · 2016-01-15 13:59 It is fixed. ---------------------------------------------------------------------- mica · 2016-01-15 18:22 Thanks zeljko its building now but its Qt not Qtopia. its ok for me ,im going now the fpgui/mseide/qt way its seems more promising. There ist next to nothing docu for the qtopia/embedded setup for lazarus, dens screenshot is from 2009? with lazarus 0.9.29 http://users.telenet.be/Jan.Van.hijfte/qtforfpc/Lazarus_Embedded.png i dont want to waste your time, thanks again for your work. ---------------------------------------------------------------------- zeljko · 2016-01-15 20:43 I'm sorry I cannot help you about QTOPIA, smallest device I've used with lclqt was Nokia N9 and lazarus apps worked fine. ---------------------------------------------------------------------- mica · 2016-01-15 22:32 No Problem, again thanks for your work When i find some time i´ll try to bring the wiki about Qtopia in an current state.