[fpc-pascal] libQT4Pas - Why it is needed?

Michael Van Canneyt michael at freepascal.org
Sun Jan 29 20:55:57 CET 2012



On Sun, 29 Jan 2012, Krzysztof wrote:

> Hi,
>
> I am wondering. If I build application for linux using gtk2 widgetset
> for GNOME (or XFCE etc.) and send this program to my friend, then he
> can run it without any external librarys (of course if he have gnome
> too), this same thing on windows. But why when I build application on
> KDE interface I need some external libQT4Pas to run it and my friend
> need it too (he have KDE so all QT librarys too)? There is no
> libGTK4Pas so why exists layer libQT4Pas? What is difference between
> GTK and QT librarys?

GTK has a procedural C interface, it is exposed in the GTK libraries. 
The FPC compiler understands this interface.

Qt is written in C++, and exposes C++ classes in the Qt libraries. 
The FPC compiler does not know how to handle C++ classes.
Therefor, a 'procedural' interface to the C++ needs to be made, and 
this is libQT4Pas. It is generated by a GCC.

Michael.



More information about the fpc-pascal mailing list