Recent

Author Topic: Why do i need libqt5pas?  (Read 2589 times)

el3ctrolyte

  • Guest
Why do i need libqt5pas?
« 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?

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Why do i need libqt5pas?
« Reply #1 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).

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Why do i need libqt5pas?
« Reply #2 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

Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018