Forum > Other

fpGUI (or: I must be stupid)

(1/2) > >>

Bart:
Using Lazarus trunk/fpc 3.0.0 32-bit on Windows 7

I wanted to try out fpGUI.
Got source (stable) form https://github.com/graemeg/fpgui/
I read http://wiki.lazarus.freepascal.org/fpGUI_Interface
I followed the steps at "Using Lazarus (trunk)"

In compiler options I set widgetset to fpGUI.
I hit Ctrl+F9 and got:
fpg_impl.pas(26,3) Fatal: Can't find unit x used by fpg_impl
where fpg_imp = C:\devel\lazarus\lcl\interfaces\fpgui\src\corelib\x11\fpg_impl.pas

That does not sound OK to me.
I set Target to win32, Processor to i386: no change.
I build lcl\interfaces\fpgui\src\corelib\gdi\fpgui_toolkit and add it as dependency to current project: no change.

Lazarus passes this to the compiler:
 -Twin32 -Pi386 -MObjFPC -Scghi -Cirot -O1 -gs -gl -gh -l -vewnhibq -Filib\i386-win32 -FuMijnLib -FuC:\devel\lazarus\components\synedit\units\i386-win32\fpgui -FuC:\devel\lazarus\components\lazcontrols\lib\i386-win32\fpgui -FuC:\devel\lazarus\lcl\units\i386-win32\fpgui -FuC:\devel\lazarus\lcl\units\i386-win32 -FuC:\devel\lazarus\components\lazutils\lib\i386-win32 -FuC:\devel\lazarus\lcl\interfaces\fpgui\lib\i386-win32 -FuC:\devel\lazarus\packager\units\i386-win32 -Fu. -FUlib\i386-win32 -dLCL -dLCLfpgui -FcUTF8

Obviously I do something wrong (which would imply that the cited wiki-page is not correct anymore)?

Bart

lainz:
Is just an idea but why you don't try trunk of fpgui, I've used it and works really well.

Bart:
Done that: same result.
Actually I tried trunk first, then reverted to stable hoping the problem would go away.

Where is Graeme when you need him?

Bart

Graeme:
I didn't check the wiki, but just did the following with Lazarus (trunk) and fpGUI ('maint' branch). As far as I know the LCL-fpGUI widgetset hasn't been updated yet to support fpGUI's 'develop' branch.

Lazarus IDE seems to frequently change its dialogs and setting locations, so many of the Wiki information goes out of date frequently, and the wiki doesn't support information per Lazarus IDE version. This is not just an issue with the fpGUI information, but any Lazarus IDE information.

Anyway, the steps to compile a LCL-fpGUI application:

* Switch to the 'maint' branch in the cloned fpGUI repository
* Start a new LCL application
* Tell it to use LCL-fpGUI widgeset by using the Additions and Overrides dialog:

* define IDE Macro: LCLWidgetType := fpgui
* define IDE Macro: fpGUIPlatform := gdi
* Compile your project
Step 3.2 is what you were missing, and it what sets some platform specific unit search paths.

I've attached screenshots of the Additions and Overrides dialog where to find the setting items.

Notes:

* TLabel is not yet implement. It will cause an AV in your program at runtime.
* Most of the components on the Standard palette have been implement, some from the Additional palette and various Dialogs and Win32 API calls (eg: ShowMessage)
* I highly recommend using fpGUI directly - not via the LCL-fpGUI widgetset. That is the only way you will get the full benefit of what fpGUI offers. The fpGUI repository also contains Lazarus IDE add-on packages than register new Project Types to help you speed up the process of starting a new "pure" fpGUI Application - see the extras directory..

Bart:
Yes, it compiles now.
But it immediately sigsevs.

1 form
1 tedit
1 tbutton


--- Code: ---C:\Users\Bart\LazarusProjecten>gdb test.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Users\Bart\LazarusProjecten/test.exe...done.
(gdb) run
Starting program: C:\Users\Bart\LazarusProjecten/test.exe
[New Thread 4324.0x253c]
WARNING: TLazIntfImage.ChooseRawBitsProc Unsupported BitsPerPixel=0

Program received signal SIGSEGV, Segmentation fault.
0x005150c9 in TFPGGDIAPPLICATION__DOWAKEMAINTHREAD (SENDER=0x0,
    this=<error reading variable>) at ./fpgui/src/corelib/gdi/fpg_gdi.pas:1279
1279      Windows.PostMessage(TfpgGDIWindow(MainForm).WinHandle, WM_NULL, 0, 0);

(gdb) bt
#0  0x005150c9 in TFPGGDIAPPLICATION__DOWAKEMAINTHREAD (SENDER=0x0,
    this=<error reading variable>) at ./fpgui/src/corelib/gdi/fpg_gdi.pas:1279
#1  0x004238d8 in TAPPLICATION__QUEUEASYNCCALL (
    AMETHOD=0x419890 <TCUSTOMFORM__MOVED>, DATA=0,
    this=<error reading variable>) at ./include/application.inc:2260
#2  0x00419885 in TCUSTOMFORM__WMMOVE (MESSAGE=...,
    this=<error reading variable>) at ./include/customform.inc:729
#3  0x0040c2e8 in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#4  0x005695dc in VMT_$FORMS_$$_TCUSTOMFORM ()
#5  0x00000012 in ?? ()
#6  0x00000003 in ?? ()
#7  0x0223fca0 in ?? ()
#8  0x004d4f61 in TWINCONTROL__WNDPROC (MESSAGE=...,
    this=<error reading variable>) at ./include/wincontrol.inc:5377
#9  0x0041ae9d in TCUSTOMFORM__WNDPROC (THEMESSAGE=...,
    this=<error reading variable>) at ./include/customform.inc:1456
#10 0x00537049 in DELIVERMESSAGE (TARGET=0x248a670, AMESSAGE=void)
    at lclmessageglue.pas:112
#11 0x00537206 in LCLSENDMOVEMSG (TARGET=0x248a670, XPOS=646, YPOS=101,
    MOVETYPE=0, FROMINTERFACE=false) at lclmessageglue.pas:296
#12 0x0050035c in TFPGUIPRIVATEWIDGET__SETPOSITION (AX=646, AY=101,
    this=<error reading variable>) at ./fpgui/fpguiwsprivate.pp:803
#13 0x00537b48 in TFPGUIWSWINCONTROL__SETBOUNDS (AWINCONTROL=0x248a670,
    ALEFT=646, ATOP=101, AWIDTH=624, AHEIGHT=493, pvmt=0x248b030)
    at ./fpgui/fpguiwscontrols.pp:206
#14 0x004d9e60 in TWINCONTROL__DOSENDBOUNDSTOINTERFACE (
    this=<error reading variable>) at ./include/wincontrol.inc:8410
#15 0x0041aeef in TCUSTOMFORM__DOSENDBOUNDSTOINTERFACE (
    this=<error reading variable>) at ./include/customform.inc:1471
#16 0x004d9f66 in TWINCONTROL__REALIZEBOUNDS (this=<error reading variable>)
    at ./include/wincontrol.inc:8461
#17 0x004da204 in TWINCONTROL__REALIZEBOUNDSRECURSIVE (
    this=<error reading variable>) at ./include/wincontrol.inc:8499
#18 0x004d1e3a in TWINCONTROL__DOALLAUTOSIZE (this=<error reading variable>)
    at ./include/wincontrol.inc:3533
#19 0x004e40da in TCONTROL__ENABLEAUTOSIZING (this=<error reading variable>)
    at ./include/control.inc:5451
#20 0x004e25d0 in TCONTROL__SETVISIBLE (VALUE=true,
    this=<error reading variable>) at ./include/control.inc:4287
#21 0x004192e6 in TCUSTOMFORM__SETVISIBLE (VALUE=true,
    this=<error reading variable>) at ./include/customform.inc:488
#22 0x0041cc07 in TCUSTOMFORM__SHOW (this=<error reading variable>)
    at ./include/customform.inc:2243
#23 0x004227ed in TAPPLICATION__RUN (this=<error reading variable>)
    at ./include/application.inc:1390
#24 0x00401e6a in main () at test.lpr:19

--- End code ---

Bart

Navigation

[0] Message Index

[#] Next page

Go to full version