Forum > Linux
Tips for cross-compiling a GUI Application to Linux?
Cascade:
--- Quote from: Thausand on November 09, 2025, 10:37:50 pm ---There no standard.
--- End quote ---
Understood! :)
I've had a read of the FPC Wiki you linked to above. Seems GTK2 is a large size dependency, so instead I first tried to cross-compile for GTK3 (since Fedora Gnome includes GTK3 & 4 by default).
Couldn't get Lazarus to compile for GTK3 - it failed at the linking stage:
--- Code: ---Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lgtk-3: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lgdk-3: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lcairo-gobject: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lgio-2.0: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lharfbuzz: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lharfbuzz-gobject: No such file or directory
Error: … cross/bin/aarch64-linux/aarch64-linux-ld: cannot find -lpangocairo-1.0: No such file or directory
--- End code ---
But I had better luck with Qt5. Fedora Gnome needed Qt5 support installing, but it's smaller than GTK2.
And the app ran successfully on Linux Fedora Gnome :)
The Qt5 UI controls themselves seem OK. But graphics such as icons appear low resolution - too low DPI, so I will have to experiment. Maybe Qt5 doesn't support HighDPI images?
Thausand:
--- Quote from: Cascade on November 09, 2025, 11:28:35 pm ---I've had a read of the FPC Wiki you linked to above. Seems GTK2 is a large size dependency, so instead I first tried to cross-compile for GTK3 (since Fedora Gnome includes GTK3 & 4 by default).
--- End quote ---
I have admit not have development experience fedora core.
Is true, desktop widget is big dependency. qt is except.
--- Quote ---Couldn't get Lazarus to compile for GTK3 - it failed at the linking stage:
--- End quote ---
No xp is also mean I no can help :'( But many programmer skill on forum that may be can ?
--- Quote ---The Qt5 UI controls themselves seem OK. But graphics such as icons appear low resolution - too low DPI, so I will have to experiment. Maybe Qt5 doesn't support HighDPI images?
--- End quote ---
Have quick search and have give thread (have try suggest and see if work/understand how do dpi for qt): https://forum.lazarus.freepascal.org/index.php/topic,72293.0.html (if forum have set sessionid for link then have remove session id or have search forum "Scaling the QT 5 application" and user zeljko (is person main development libqt5/6pas)
Seenkao:
--- Quote from: Cascade on November 09, 2025, 10:20:35 pm ---This is probably a naive question - but does Linux generally come with widget set support 'out-of-the-box' ? I'm guessing it has something already for the operating system UI and built in apps. But is there something I can generally rely on to always be there for anyone running a (non-minimal) Linux install?
Or put another way - which widget set is most likely to just work on Linux? (I will now go read the FPC wiki link you suggested - as it may well answer this). Thanks again!
--- End quote ---
В большинтсве случаев приложения основанные на X11 должны работать на многих компьютерах с Linux.
Возможно у вас отсутствует установленный пакет dev (libgdk****.dev).
Google translate:
In most cases, X11-based applications need to run on many Linux computers.
You may not have the dev (libgdk****.dev) package installed.
Navigation
[0] Message Index
[*] Previous page