Recent

Author Topic: Qt6 version number in Debian  (Read 1575 times)

cdbc

  • Hero Member
  • *****
  • Posts: 2921
    • http://www.cdbc.dk
Re: Qt6 version number in Debian
« Reply #15 on: June 28, 2026, 04:07:23 pm »
Hi
@Robert: Qt is coded in C++ and we as pascal'ers cannot directly interact with C++, but have to create a 'flattening' C-Interface for the c++-classes, which is what libqt6pas.so is doing -- Quite clever actually & a lot of work on @zeljko's part -- Thanks for that mate =^
Regards Benny

Ps.: I cannot believe you didn't know that Robert.... %)
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #16 on: June 28, 2026, 04:39:52 pm »
Hi
@Robert: Qt is coded in C++ and we as pascal'ers cannot directly interact with C++, but have to create a 'flattening' C-Interface for the c++-classes, which is what libqt6pas.so is doing -- Quite clever actually & a lot of work on @zeljko's part -- Thanks for that mate =^
Regards Benny

Ps.: I cannot believe you didn't know that Robert.... %)

and can that 'shim' (libqt6pas.so) not be statically linked into an ELF binary at build-time? rendering... a standalone ELF binary that can directly talk to Qt.

i am also not sure why one can not devise a method of directly interacting with C++ code. we are, after all, just dealing with glorified Turing Machines.


cheers,
rob   :-)

dsiders

  • Hero Member
  • *****
  • Posts: 1676
Re: Qt6 version number in Debian
« Reply #17 on: June 28, 2026, 04:52:23 pm »
I love it when people tell you how simple a "thing" is... but never tell you the solution.

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #18 on: June 28, 2026, 04:52:50 pm »
i asked Gemini, and she offered the following opinion:

Q: can the FPC compiler not use the C++ compiler, at built-time, to generate the interface and incorporate the resulting binary code into the final ELF binary?

Gemini's response:
"Yes, the Free Pascal compiler (FPC) can absolutely leverage the C++ compiler (g++) at build-time to handle the C++ binary generation, and automatically incorporate the resulting object code into the final ELF binary via the GNU linker (ld).

However, the C++ compiler cannot generate the Pascal interface source code for you. FPC still cannot read C++ headers directly, so a tool must translate those headers into Pascal format (.pas) during the build process.

You can automate this entire workflow using Makefiles or FPC's native build tool, FPCMake, to orchestrate a seamless build."

zeljko

  • Hero Member
  • *****
  • Posts: 1998
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt6 version number in Debian
« Reply #19 on: June 28, 2026, 04:54:46 pm »
Talking is easy, show me the code  8-)

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #20 on: June 28, 2026, 05:00:13 pm »
Talking is easy, show me the code  8-)

in reply #11 above you suggested there was no issue: take the existing libqt6pas.so and statically link it with your FPC/LCL application. what is the result of doing just that? or have i misinterpreted what you were saying in reply #11?


cheers,
rob   :-)

zeljko

  • Hero Member
  • *****
  • Posts: 1998
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt6 version number in Debian
« Reply #21 on: June 30, 2026, 12:43:37 pm »
Result is that you must use libqt5pas.so with your app (kylix used libqt(2) in a same way afair), but you don't need qt libs installed on your system.

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #22 on: June 30, 2026, 01:48:24 pm »
zeljko:
    looking back, i see that i raised the issue of statically linking libqt5pas on the 8th of March 2026 in this thread:
https://forum.lazarus.freepascal.org/index.php/topic,73405.msg578013.html#msg578013
(Reply #200)

... where i posed the question to PascalDragon, "how do i statically link the "Qt*Pas" library to my application?". unfortunately a response was never given to my question, and the thread was locked a few days later by the OP.


doing a further search, i see that in this thread on 12th November 2020:
https://forum.lazarus.freepascal.org/index.php/topic,52108.msg383472.html#msg383472
(Reply #4)

... you (zeljko) wrote, "I've alre[a]dy tried to build Qt5 and libQt5Pas statically (linux 64 and win32) and it works but it have problems with qt plugins, also I could not get to work theme plugins".

am i then right in saying that, around 5 years back, you did have libQt5Pas statically linking, but that there were issues that you were not able to resolve at the time?


cheers,
rob   :-)

zeljko

  • Hero Member
  • *****
  • Posts: 1998
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Qt6 version number in Debian
« Reply #23 on: June 30, 2026, 02:38:37 pm »
I've just tested if that could be done, but had problems with plugins, few months later I fix plugins problem too, so it is possible to have statically built dll or so for qt5 and qt6.

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #24 on: June 30, 2026, 02:57:27 pm »
excellent!

so this will then allow creating a single ELF binary for a program, that will run with no dependency on libqt6pas.so being installed elsewhere on the system? just wanting to make 100% sure we are on the same page here.

are you able to detail the process to achieve this? using (hopefully just) the Lazarus IDE to carry out the build.

being able to produce a fully self-contained ELF binary suddenly makes Qt far more attractive for users of Lazarus/FPC.


cheers,
rob   :-)

PascalDragon

  • Hero Member
  • *****
  • Posts: 6417
  • Compiler Developer
Re: Qt6 version number in Debian
« Reply #25 on: June 30, 2026, 11:14:13 pm »
being able to produce a fully self-contained ELF binary suddenly makes Qt far more attractive for users of Lazarus/FPC.

Only for users that create open source code, because due to libqtXpas being licensed as LGPL, this prohibits its use with a proprietary, closed source application (at least if you want to distribute it as a precompiled binary).

robert rozee

  • Sr. Member
  • ****
  • Posts: 401
Re: Qt6 version number in Debian
« Reply #26 on: July 01, 2026, 12:59:07 am »
being able to produce a fully self-contained ELF binary suddenly makes Qt far more attractive for users of Lazarus/FPC.
Only for users that create open source code, because due to libqtXpas being licensed as LGPL, this prohibits its use with a proprietary, closed source application (at least if you want to distribute it as a precompiled binary).

hi PascalDragon,
        lets stick a pin in the legal arguments for the moment and concentrate on the technical side of things.


cheers,
rob   :-)
« Last Edit: July 01, 2026, 03:00:29 am by robert rozee »

cdbc

  • Hero Member
  • *****
  • Posts: 2921
    • http://www.cdbc.dk
Re: Qt6 version number in Debian
« Reply #27 on: July 01, 2026, 10:45:43 am »
Hi
@Robert rozee: If you're so hung up on this dependency thingy, aren't you forgetting 2 of the best candidates for just that, namely "fpGUI" & "mseGUI"?!?
Both widgetsets are written in __pascal__ and I for one, can vouch for 'fpGUI' to be great and very much like QT6, by look and feel.
With regards to 'mseGUI', @Fredvs would be more knowledgeable to answer that, as he's the current maintainer (amo.)...
-- Just sayin' --
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Fred vS

  • Hero Member
  • *****
  • Posts: 3957
    • StrumPract is the musicians best friend
Re: Qt6 version number in Debian
« Reply #28 on: July 01, 2026, 08:54:00 pm »
Hi
@Robert rozee: If you're so hung up on this dependency thingy, aren't you forgetting 2 of the best candidates for just that, namely "fpGUI" & "mseGUI"?!?
Both widgetsets are written in __pascal__ and I for one, can vouch for 'fpGUI' to be great and very much like QT6, by look and feel.
With regards to 'mseGUI', @Fredvs would be more knowledgeable to answer that, as he's the current maintainer (amo.)...
-- Just sayin' --
Regards Benny

Hello Benny, and thank you for your kind and realistic comments.

Indeed, fpGUI and MSEgui are widgetsets written entirely in Pascal, for FPC, and without any dependencies like other widgetsets.

Both can mimic the layout of every widgetset. MSEgui can dock windows and has many widgets.

Last releases of fpGUI and MSEgui are perfectly stable and will give you a lot of enjoyment (without the nightmare of dependencies on other "tenor" widgetsets).
« Last Edit: July 01, 2026, 09:04:44 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018