Recent

Author Topic: [SOLVED] Compiling Qt5 bindings (libQt5Pas.so)  (Read 1165 times)

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
[SOLVED] Compiling Qt5 bindings (libQt5Pas.so)
« on: January 12, 2024, 08:16:01 pm »
Hello,

I need help with compiling Qt5 bindings. I follow the ../lcl/interfaces/qt5/cbindings/README.TXT and I got this error:
Code: Pascal  [Select][+][-]
  1. [v1@localhost cbindings]$ qmake -query
  2. QT_SYSROOT:
  3. QT_INSTALL_PREFIX:/usr
  4. QT_INSTALL_ARCHDATA:/usr/lib64/qt5
  5. QT_INSTALL_DATA:/usr/share/qt5
  6. QT_INSTALL_DOCS:/usr/share/doc/packages/qt5
  7. QT_INSTALL_HEADERS:/usr/include/qt5
  8. QT_INSTALL_LIBS:/usr/lib64
  9. QT_INSTALL_LIBEXECS:/usr/libexec/qt5
  10. QT_INSTALL_BINS:/usr/lib64/qt5/bin
  11. QT_INSTALL_TESTS:/usr/tests
  12. QT_INSTALL_PLUGINS:/usr/lib64/qt5/plugins
  13. QT_INSTALL_IMPORTS:/usr/lib64/qt5/imports
  14. QT_INSTALL_QML:/usr/lib64/qt5/qml
  15. QT_INSTALL_TRANSLATIONS:/usr/share/qt5/translations
  16. QT_INSTALL_CONFIGURATION:/etc/xdg
  17. QT_INSTALL_EXAMPLES:/usr/lib64/qt5/examples
  18. QT_INSTALL_DEMOS:/usr/lib64/qt5/examples
  19. QT_HOST_PREFIX:/usr
  20. QT_HOST_DATA:/usr/lib64/qt5
  21. QT_HOST_BINS:/usr/lib64/qt5/bin
  22. QT_HOST_LIBS:/usr/lib64
  23. QMAKE_SPEC:linux-g++
  24. QMAKE_XSPEC:linux-g++
  25. QMAKE_VERSION:3.1
  26. QT_VERSION:5.15.12
  27. [v1@localhost cbindings]$ qmake
  28. Project MESSAGE: Note: This binding version was generated for Qt 5.6.1. Current Qt is 5.15.12
  29. Project MESSAGE: Qt documents binary compatibility in each Version Change Note: http://qt.nokia.com/developer/changes
  30. Project MESSAGE: Adding x11extras for XOrg platform.
  31. Project MESSAGE: Pascal Qt Interface for binding platform: BINUX
  32. Project MESSAGE: Install location: /usr/lib64
  33. [v1@localhost cbindings]$ make
  34. g++ -c -pipe -Wfatal-errors -O2 -w -D_REENTRANT -fPIC -DBINUX -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/include/qt5 -I/usr/include/qt5/QtPrintSupport -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtX11Extras -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -Itmp -I/usr/lib64/qt5/mkspecs/linux-g++ -o tmp/qobject_hook_c.o src/qobject_hook_c.cpp
  35. In file included from src/qobject_hook.h:18,
  36.                  from src/qobject_hook_c.h:15,
  37.                  from src/qobject_hook_c.cpp:12:
  38. src/pascalbind.h:18:10: fatal error: qapplication.h: Adresář nebo soubor neexistuje  // = Directory or file not exists
  39.    18 | #include <qapplication.h>
  40.       |          ^~~~~~~~~~~~~~~~
  41. compilation terminated.
  42. make: *** [Makefile:2601: tmp/qobject_hook_c.o] Chyba 1
  43. [v1@localhost cbindings]$

Are the Qt5 versions too different (5.6 .1 vs 5.15.12)?

Thanks.
« Last Edit: January 13, 2024, 12:17:50 am by Blaazen »
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

zeljko

  • Hero Member
  • *****
  • Posts: 1600
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Compiling Qt5 bindings (libQt5Pas.so)
« Reply #1 on: January 12, 2024, 11:13:22 pm »
I have not such problem. Maybe you compiled libQt5Pas in same directory and there's stalled .qmake.stash file ? Did you install dev packages of qt , so all include files are in /usr/include/qt5 ? Also, there can be few qmakes on disc, check if that one is for qt5 (not for qt4 or qt6).

cdbc

  • Hero Member
  • *****
  • Posts: 1165
    • http://www.cdbc.dk
Re: Compiling Qt5 bindings (libQt5Pas.so)
« Reply #2 on: January 12, 2024, 11:14:10 pm »
Hi
I used "qmake-qt5" instead of "qmake" when I had similar errors, it worked like a charm...
HTH
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Compiling Qt5 bindings (libQt5Pas.so)
« Reply #3 on: January 13, 2024, 12:17:08 am »
I had no dev packages installed. That was it.

Thanks.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

 

TinyPortal © 2005-2018