Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-03

Is LCL-GTK still possible?

13 messages · 6 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I was just curious, so created a new application and dropped a few standard widgets on the main form. Set the LCL target to GTK1 and tried to compile the project. It failed with the "Cannot find LCLIntf used by GtkDef...."

See attached screenshot. Am I correct, that the LCL widgetset should auto compile, even though my Lazarus IDE is compiled with LCL-GTK2?

I'm using FPC 3.0.4 (64-bit) under Ubuntu Linux using Lazarus 2.1.0 (dated 2019-02-09).

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: screenshot_20190326T093939.png Type: image/png Size: 27109 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190326/9d1f1c10/attachment-0001.png>

Reply by email

Graeme Geldenhuys
to leledumbo
leledumbo wrote
Maybe activate clean before build?

Where do I do this? Like I said, I created a brand new test project, designed the main form, set the LCL WidgetType to GTK. Saved the project and then tried to do a "compile". So the project doesn't contain any existing ppu files. With my current Lazarus compiled in February, I always do a 'make clean; make bigide' and it defaulted to compiling the Lazarus IDE with GKT2.

I know in the past (many years ago) you had to manually rebuild LCL (by building the IDE) for other widget types. But since LCL is now a "standard package" like any other *.lpk package, I thought it should build automatically when needed. Is this assumption not correct?

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys: Correct. I want to see if LCL-GTK1 is still possible using Lazarus 2.1.0 or later. Graeme
Graeme Geldenhuys wrote
Correct. I want to see if LCL-GTK1 is still possible using Lazarus 2.1.0 or later.

And just to add, I'm using Ubuntu 18.04 LTS and have the gtk1 libraries installed. I can compile and run from the command line, all the FPC gtk1 examples (ie: fpc-3.3.1/src/packages/gtk1/examples/ )

So I know my GTK1 environment and dependencies are fully working.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: I was just curious, so created a new application and dropped a few standard widgets on…
Show quoted text 9 lines
Hi, I was just curious, so created a new application and dropped a few standard widgets on the main form. Set the LCL target to GTK1 and tried to compile the project. It failed with the "Cannot find LCLIntf used by GtkDef...." See attached screenshot. Am I correct, that the LCL widgetset should auto compile, even though my Lazarus IDE is compiled with LCL-GTK2?

It shows "incompatible ppu...". Have you compiled clean? For example Run / Clean up and build?

Mattias

Reply by email

Mattias Gaertner
to Bart: On Tue, Mar 26, 2019 at 10:56 AM Graeme Geldenhuys via lazarus AFAIK: yes. Bart
Show quoted text 9 lines
On Tue, Mar 26, 2019 at 10:56 AM Graeme Geldenhuys via lazarus wrote: > I know in the past (many years ago) you had to manually rebuild LCL > (by building the IDE) for other widget types. But since LCL is now a > "standard package" like any other *.lpk package, I thought it should > build automatically when needed. Is this assumption not correct? AFAIK: yes.

Yes, since many years.

But the IDE does not automatically wipe out all output directories. That would break some packages / setups. It only passes -B. When files have moved/renamed you might need to clean up before build. e.g. Run / Clean up and build.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Tue, 26 Mar 2019 09:43:59 +0000 It shows "incompatible ppu...". Have you compiled…
Mattias Gaertner wrote
It shows "incompatible ppu...". Have you compiled clean? For example Run / Clean up and build?

I've never used that before.... Doesn't Lazarus keep compiled units in separate output directories? I had a quick look in the LCL package and I see the output directory is set as

../units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType)

So surely having built Lazarus from source and only ever used LCL-GTK2, there should not have been any interference with outdated ppu files when I try and build an application using LCL-GTK1?

Maybe some packages included with Lazarus don't have the correct unit output directories set? Hence the "Clean up and build..." option being required. This is the only conclusion I could think of as to why ppu files would be out of date on my system. This system has only been set up from scratch 2 months ago.

Aside from that, the above suggestion and the latest fixes you committed has resolved the issue. I have managed to successfully compile and run a LCL-GTK1 application. Thanks. :)

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 6 lines
On 26/03/2019 13:22, Mattias Gaertner via lazarus wrote: > It shows "incompatible ppu...". Have you compiled clean? > For example Run / Clean up and build? I've never used that before.... Doesn't Lazarus keep compiled units in separate output directories?

Yes - at least for the Lazarus sources.
But when an unit is moved to another package, the old ppu is still in the old folder.

Show quoted text 11 lines
I had a quick look in the LCL package and I see the output directory is set as ../units/$(TargetCPU)-$(TargetOS)/$(LCLWidgetType) So surely having built Lazarus from source and only ever used LCL-GTK2, there should not have been any interference with outdated ppu files when I try and build an application using LCL-GTK1? Maybe some packages included with Lazarus don't have the correct unit output directories set?

I doubt that. You are compiling some central packages.

Hence the "Clean up and build..." option being required. This is the only conclusion I could think of as to why ppu files would be out of date on my system. This system has only been set up from scratch 2 months ago.

It was just a guess. Maybe your system has another reason, why the compiler does not like the ppu file. Compile with -vt.

Aside from that, the above suggestion and the latest fixes you committed has resolved the issue. I have managed to successfully compile and run a LCL-GTK1 application. Thanks. :)

:)

Mattias

Reply by email