Lazarus

Programming => Widgetset => QT => Topic started by: el3ctrolyte on January 28, 2021, 09:18:59 am

Title: Why do i need libqt5pas?
Post by: el3ctrolyte on January 28, 2021, 09:18:59 am
Other widgetsets that freepascal supports doesn't need a dynamicly linked interface for freepascal. But qt5 does. Why was it done this way?
Title: Re: Why do i need libqt5pas?
Post by: PascalDragon on January 28, 2021, 09:21:04 am
Qt is written in C++. FPC can't directly access C++ classes, thus a flattening library is required. In theory it would be possible to do this with a static library as well, but that would result in even larger executables. (Sidenote: Qt4 also has the dependency on a libqt4pas).
Title: Re: Why do i need libqt5pas?
Post by: dbannon on January 28, 2021, 11:04:11 am
In practice, its a non issue el3ctrolyte, all Lazarus apps have dependencies, if you build a GTK2 app, you will specify it requires GTK2. And, yep, some Linux systems are available that don't have GTK2 installed by default.  By specifying that your Qt5 app depends on libqt5pas, you cover all its QT5 dependencies.

Most current linux disros have a viable libqt5pas in their repositories. There is a 'generic' one suitable for a few older distros at https://github.com/davidbannon/libqt5pas

Davo

TinyPortal © 2005-2018