Forum > GTK

Using GTK3 on Lazarus

(1/4) > >>

Handoko:
Sorry to interrupt.

I'm not good in strategy nor predicting which one is the best for the future. I'm more interested to test GTK3 but I can't simply make a hello world test to work.

On the project options > Compiler Options > Additions and Overrides > I already set LCLWidgetType to gtk3. But I got a compile-time error: error while linking, cannot find -lgdk-3. I'm using Lazarus 2.0.10 on Ubuntu Mate 20.10, which I believe already fully supports GTK3.

I checked gdk-3 on Synaptic Package Manager, there is nothing called gdk-3. The most similar I can get is libgdk3.0-cil-dev, which I believe is not what it needs.

Can anyone tell me or at least give me link showing how to use GTK3 on Lazarus?

af0815:
I think it is the best

a ) It is defined what kind of systempackages need on a bare-metal debian/ubuntu to start with gtk3 (or gtk4) and also pushed in the wiki (maybe this is documentated yet, but where ?)
b ) A seperate thread is used for the questions and suceeses (maybe if there are)

Jurassic Pork:
hello,

--- Quote from: Handoko on January 16, 2021, 03:28:04 pm ---I checked gdk-3 on Synaptic Package Manager, there is nothing called gdk-3. The most similar I can get is libgdk3.0-cil-dev, which I believe is not what it needs.

--- End quote ---
on Ubuntu 20.04   libgdk-3 is in the package libgtk-3-dev (see attachment).
Friendly, J.P

dbannon:

Hmm, good catch !  I have added a reference to libgtk-3-dev on to https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_Linux

Davo

Handoko:
I quickly tested GTK3, yes it works after added libgtk-3-dev. Thank you.

For the programs from the same source code compiled to GTK2 and GTK3, I didn't see any differences on their appearances. Unfortunately, TOpenGLContext hasn't support GTK3. I got a "this LCL widgetset/OS is not yet supported" compile-time error message.

Navigation

[0] Message Index

[#] Next page

Go to full version