[fpc-pascal] FPGUI on Windows

James Richters james.richters at productionautomation.net
Fri Nov 29 22:58:14 CET 2024


Thought this should be a separate thread... sorry it if ends up confusing
things.

I'm trying to get FPGUI to work on Windows 10 with just FPC without Lazarus,
and I'm just not having any luck.  
These seem to be three ways to install FPGUI on Windows.
1. Build it from a command line
2. Compile it with the Text IDE
3. Install it with FPCUPDELUXE

I haven't got any of these to work.  When I try to build from the command
line I get 
fpg_oledragdrop.pas(113,23) Error: No matching implementation for interface
method "SetData(const tagFORMATETC;var TagSTGMEDIUM;LongBool):LongInt;
StdCall;" found
See original message below

Next I thought I would try FPCUPDELUXE, so I used it to install a fresh copy
of 3.2.2 and then went to modules to install FPGUI it seems like it's going
to work, but then it gets an error:
Exception: EInOutError. File not open

The info has this:
info: Universal Installer (GetModule: fpgui): Getting module fpgui.
info: Universal Installer (GetModule: fpgui): Going to download/update from
GIT repository https://github.com/graemeg/fpgui.
info: Universal Installer (GetModule: fpgui): Please wait: this can take
some time (if repo is big or has a large history).
info: Performing SVN/GIT/HG/FTP/URL checkout/download. Please wait, could
take some time.
info: Universal Installer (GetModule: fpgui): Download/update from GIT
repository ok.
info: Universal Installer (GetModule: fpgui): No fpgui patches defined.
Then it just stops, and I don't see any fpgui directory in my
units/{Processor} folder which is what I was expecting to happen... maybe
this isn't what's supposed to happen... but it doesn't seem to finish.

So finally I tried the instructions for compiling it with the Text IDE, I
added all the directories required as per the instructions, and randomly
pick a few examples to try to compile, and fpg_base.pas on line 41 I get:
fpg_base.pas(41,32) Error: Parameters or result types cannot contain local
type definitions. Use a separate type definition in a type block.
The line is:   TfpgChar        = type String[4];    It doesn't seem to like
the [4] 

I have tried all kinds of various compiler options like Use AnsiStrings and
just a bunch of random settings like turning optimizations on and off...
because it seems like this would be more of a compiler setting than a bug in
the program, because a bug would have been fixed years ago... so I'm
guessing it's something wrong with how I have it set up, but what I would
need to fix? I have no idea... other than changing the source code... I
guess I could change it to an array of characters or something... but why am
I getting an error at all?  Nothing I change allows this line to compile.

So I thought maybe it's because I'm trying to use the current trunk, so I
tried the same thing with 3.2.2, and on there I get:  fpg_impl.pas(26,3)
Fatal: Can't find unit x used by fpg_impl
Just for fun I commeneded fpg_impl out and 3.2.2 does get past TfpgChar
= type String[4];     without error... but then there are more errors
because of commenting out fpg_impl.   So I feel I might be getting close..
but what is Unit X? and where do I get it?  Is there some dependency I need
for FPGUI?

For even more fun I tried to change TfpgChar        = type String[4];     to
just TfpgChar        = String[4];    in the current trunk, and then that
line does compile, but then I'm back to being unable to find Unit X.
I'm not sure if I have some setting in a way that FPGUI doesn't expect it to
be, or what the issue is, I just don't know where to look.   I don't know
what Unit X is or why I don't have it. It looks like a really cool package
and I hope I can get it working. I have some GDI windows in my FPC projects,
but FPGUI looks a lot easier to implement and a lot less confusing.

James



------Original Message-----
>>That builds the whole GUI toolkit from the command line. Works on Windows,
MacOS, Linux and FreeBSD.

I'm intrigued by FPGUI, I'm trying to build FPGUI on Windows 10, and I'm
having some difficulty.  When I follow the instructions from Install.txt I
get this:

R:\fpgui_src_1.4.1\fpgui-1.4.1\src>build
"You've got the correct output lib directory"
Compiling GDI CoreLib
Free Pascal Compiler version 3.2.2 [2021/05/15] for i386 Copyright (c)
1993-2021 by Florian Klaempfl and others Target OS: Win32 for i386 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: I:\Programming\FPC\3.2.2\bin\i386-Win32\ppc386.exe returned an error
exitcode

Anyone have any ideas what I'm doing wrong?  This is all way over my head
I'm afraid.

James



More information about the fpc-pascal mailing list