Recent

Author Topic: [SOLVED]Linking a QT5 gui target fails with undefined reference errors.  (Read 2038 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
A QT5 GUI target fails with the errors below on the latest Lazarus release, ie the 2023-12-23 version.

What could I be missing?

Quote
Warning: linker: /usr/bin/ld: ../Lazarus-3.0.0-2023-12-23/lazarus/lcl/units/x86_64-linux/qt5/qtint.o: in function `CREATE':
qtobject.inc(44,0) Error: linker: undefined reference to `QGuiApplication_setFallbackSessionManagementEnabled'
Warning: linker: /usr/bin/ld: ../Lazarus-3.0.0-2023-12-23/lazarus/lcl/units/x86_64-linux/qt5/qtobjects.o: in function `ENDX11SELECTIONLOCK':
qtobjects.pas(3873,0) Error: linker: undefined reference to `QTimer_singleShot3'
dbBrowser2.lpr(37,1) Error: Error while linking


Update:

The latest download from https://github.com/davidbannon/libqt5pas/releases works fine.
« Last Edit: January 01, 2024, 09:33:57 pm by vfclists »
Lazarus 3.0/FPC 3.2.2

zeljko

  • Hero Member
  • *****
  • Posts: 1886
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Linking a QT5 gui target fails with undefined reference errors.
« Reply #1 on: January 01, 2024, 06:15:48 pm »
You must rebuild libQt5Pas manually, since your distro did not provide it yet.

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: Linking a QT5 gui target fails with undefined reference errors.
« Reply #2 on: January 01, 2024, 07:41:06 pm »
You must rebuild libQt5Pas manually, since your distro did not provide it yet.


Are the releases at https://github.com/davidbannon/libqt5pas suitable?

The latest one there notes:

Quote
Whats new
Zeljan says "removed QTimer_singleShot4() overload because it cannot be used with Qt5 < 5.10"

So I take it that QTimer_singleShot3 has now being included and QTimer_singleShot4 deprecated on the Pascal end?
Lazarus 3.0/FPC 3.2.2

dbannon

  • Hero Member
  • *****
  • Posts: 3744
    • tomboy-ng, a rewrite of the classic Tomboy
Re: [SOLVED]Linking a QT5 gui target fails with undefined reference errors.
« Reply #3 on: January 01, 2024, 10:44:29 pm »
yes, the libraries at https://github.com/davidbannon/libqt5pas will support anything you can write with Lazarus 3.0 Qt5.

The same library is now available in Debian unstable, should make it to Testing (Trixie) soon. The other deb based distros will start to pick it up then.

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