[fpc-pascal] Trying to compile fpGUI on Win 11

James Richters james.richters at productionautomation.net
Sun Jan 5 01:28:45 CET 2025


I just ran into this… After a lot of doodling around and eventually fixing it myself, I found it was already fixed years ago, but the fix never made it to the version on SourceForge.
It’s been fixed in the GitHub version in the Maint  branch Here’s the link:
https://github.com/graemeg/fpGUI/tree/maint

This compiled for me just fine with 3.2.2 on Windows 10, but if you try to compile it with the current trunk of FPC, there is another thing that needs to be fixed:
fpg_base.pas the line 38 reads:  TfpgChar        = type String[4];    
 
Something in the current trunk causes this error:
fpg_base.pas(41,32) Error: Parameters or result types cannot contain local type definitions. Use a separate type definition in a type block.
 
I fixed it by changing it to:           TfpgChar        =  String[4];    


James
 
 
>I run build.bat in /src and get this error messages:
 
>"
>λ build.bat                                                                                                                                                   
>Creating missing directory ..\lib\x86_64-win64                                                                                                                
>Compiling GDI CoreLib                                                                                                                                         
>Free Pascal Compiler version 3.2.2 [2024/09/29] for x86_64                                                                                                    
>Copyright (c) 1993-2021 by Florian Klaempfl and others                                                                                                        
>Target OS: Win64 for x64                                                                                                                                      
>Compiling corelib\gdi\fpgui_toolkit.pas                                                                                                                       
>Compiling .\corelib\fpg_base.pas                                                                                                                              
>Compiling corelib\gdi\fpg_impl.pas                                                                                                                            
>Compiling .\corelib\fpg_main.pas                                                                                                                              
>Compiling .\corelib\fpg_constants.pas                                                                                                                         
>Writing Resource String Table file: fpg_constants.rsj                                                                                                         
>Compiling corelib\gdi\fpg_interface.pas                                                                                                                       
>Compiling corelib\gdi\fpg_gdi.pas                                                                                                                             
>Compiling corelib\gdi\fpg_oledragdrop.pas                                                                                                                     
>fpg_oledragdrop.pas(113,23) Error: No matching implementation for interface method "SetData(const tagFORMATETC;var TagSTGMEDIUM;LongBool):LongInt; >StdCall;" found                                                                                                                                                          
>fpg_oledragdrop.pas(203,1) Fatal: There were 1 errors compiling module, stopping                                                                              
>Fatal: Compilation aborted                                                                                                                                    
>Error: c:\lazarus\fpc\3.2.2\bin\x86_64-win64\ppcx64.exe returned an error exitcode              "    
>Do I need to download something I'm missing?
> 
>Regards
>Mikael Backman                                                               
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20250104/32ca0083/attachment-0001.htm>


More information about the fpc-pascal mailing list