Forum > Other

[Solved] Unable to Compile FPGui

(1/4) > >>

Wilko500:
I wanted to try FPGui so install is first step but I failed right at the start. I followed the instructions for install via Lazarus.Source downloaded from SourceForge FPGui ver 1.4.1 then followed instructions

Compile fpGUI code from Lazarus:
Configure Lazarus for hosting pure fpGUI applications: =>
- in Package, => Open Package (.lpk)
Choose:
- for Windows : <fpgui>/src/corelib/gdi/fpgui_toolkit.lpk
- for Linux/FreeBSD/OSX : <fpgui>/src/corelib/x11/fpgui_toolkit.lpk
Compile the package.
Now you may compile pure fpGUI applications with Lazarus.

So Selected the x11 fpgui_toolkit.lpk and clicked compile.

Almost immediately compile failed with the message and the highlighted line of code

fpg_x11.pas(1069,18) Error: Can't determine which overloaded function to call
FDNDVersion := min(FPG_XDND_VERSION, (ev.xclient.data.l[1] and $FF000000) shr 24);

Please may I have help on this error and how to fix it

TRon:

--- Quote from: Wilko500 on January 11, 2024, 09:45:44 pm ---Source downloaded from SourceForge FPGui ver 1.4.1 then followed instructions

--- End quote ---
There exist a fpgui (1.4.1) fixes branch named maint. The issue you mentioned was fixed, see here.

That would require you to download the maint sources and try to build the fpGUI Toolkit with those instead.

Wilko500:
Thank you very much for your fast response. I’ll download and try the main version tomorrow and post an update.

TRon:

--- Quote from: Wilko500 on January 11, 2024, 10:58:04 pm ---I’ll download and try the main version tomorrow and post an update.

--- End quote ---
For the record: I wrote maint and I meant maint  :)

The name "main" in branch terminology is often used as name for the master branch. Ergo things have a tendency to go wrong very fast when you are not aware so please take note of this try to avoid any confusion.

The maint branch should work but in case it doesn't then please report.

Wilko500:
Found a moment to try tonight :)

Ok.  Thanks for the clarification.  My first ever time of accessing GitHub so I might have made mistakes.
I downloaded the maint branch, copied just the src folder to my FPGui working folder then used Lazarus to open fpgui_toolkit.lpk and compile. 

Seems to have got further but still errored.  Offending line below and then the actual errors reported

cinfo^.err^.format_message(cinfo, buffer);             

fpg_imgfmt_jpg.pas(170,43) Error: Can't take the address of constant expressions
fpg_imgfmt_jpg.pas(198,44) Error: Can't take the address of constant expressions
fpg_imgfmt_jpg.pas(221,29) Error: Incompatible types: got "<address of procedure(j_common_ptr;var AnsiString);Register>" expected "<procedure variable type of procedure(j_common_ptr;var OpenString);Register>"

Navigation

[0] Message Index

[#] Next page

Go to full version