Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Qt6 and QGis integration erro of qt5 library
Forum Updated to NodeBB v4.3 + New Features

Qt6 and QGis integration erro of qt5 library

Scheduled Pinned Locked Moved Unsolved Qt 6
3 Posts 2 Posters 530 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aman55
    wrote on last edited by
    #1

    **OS : windows 10 64 bit x64

    Qt Creator 15.0.0
    Based on Qt 6.8.1 (MSVC 2022, x86_64)

    Qt compiler : MSVC2022 64 bit

    QGIS : Online (OSGeo4W) installer: many version installed by OSGeo4W installer with qgis-qt6-dev**

    profile .

    QT       += core gui xml
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    
    
    # Include paths for QGIS and Qt
    INCLUDEPATH += C:/OSGeo4W/apps/qgis-qt6-dev/include
    # INCLUDEPATH += C:/OSGeo4W/include
    
    # Libraries for QGIS, GDAL, PROJ, and Qt
    LIBS += -LC:/OSGeo4W/apps//lib -lqgis_core -lqgis_gui -lqgis_app -lqgis_native -lqgis_analysis -lqgis_server
    # LIBS += -LC:/OSGeo4W/lib -lgdal
    # LIBS += -LC:/OSGeo4W/lib -lproj
    
    # You can make your code fail to compile if it uses deprecated APIs.
    # In order to do so, uncomment the following line.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    SOURCES += \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        mainwindow.h
    
    FORMS += \
        mainwindow.ui
    
    # Default rules for deployment.
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    

    main.cpp file

    #include "mainwindow.h"
    
    #include <QApplication>
    #include <qgsapplication.h>
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        MainWindow w;
        w.show();
        return a.exec();
    }
    
    

    Issue:- Giving error of qt5 dll file why? qt5xml, qt5svg, qt5sql.dll etc.

    Screenshot (9).png

    Christian EhrlicherC 1 Reply Last reply
    0
    • A Aman55

      **OS : windows 10 64 bit x64

      Qt Creator 15.0.0
      Based on Qt 6.8.1 (MSVC 2022, x86_64)

      Qt compiler : MSVC2022 64 bit

      QGIS : Online (OSGeo4W) installer: many version installed by OSGeo4W installer with qgis-qt6-dev**

      profile .

      QT       += core gui xml
      
      greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
      
      CONFIG += c++17
      
      
      # Include paths for QGIS and Qt
      INCLUDEPATH += C:/OSGeo4W/apps/qgis-qt6-dev/include
      # INCLUDEPATH += C:/OSGeo4W/include
      
      # Libraries for QGIS, GDAL, PROJ, and Qt
      LIBS += -LC:/OSGeo4W/apps//lib -lqgis_core -lqgis_gui -lqgis_app -lqgis_native -lqgis_analysis -lqgis_server
      # LIBS += -LC:/OSGeo4W/lib -lgdal
      # LIBS += -LC:/OSGeo4W/lib -lproj
      
      # You can make your code fail to compile if it uses deprecated APIs.
      # In order to do so, uncomment the following line.
      #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
      
      SOURCES += \
          main.cpp \
          mainwindow.cpp
      
      HEADERS += \
          mainwindow.h
      
      FORMS += \
          mainwindow.ui
      
      # Default rules for deployment.
      qnx: target.path = /tmp/$${TARGET}/bin
      else: unix:!android: target.path = /opt/$${TARGET}/bin
      !isEmpty(target.path): INSTALLS += target
      
      

      main.cpp file

      #include "mainwindow.h"
      
      #include <QApplication>
      #include <qgsapplication.h>
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          MainWindow w;
          w.show();
          return a.exec();
      }
      
      

      Issue:- Giving error of qt5 dll file why? qt5xml, qt5svg, qt5sql.dll etc.

      Screenshot (9).png

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Aman55 said in Qt6 and QGis integration erro of qt5 library:

      Issue:- Giving error of qt5 dll file why? qt5xml, qt5svg, qt5sql.dll etc.

      So you somehow loaded the Qt5 qgis stuff. You can not mix it. It's up to you to make sure to use the correct ones - what should we do here?
      You can check which dlls are loaded from which dependency with e.g. Dependencies

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      A 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @Aman55 said in Qt6 and QGis integration erro of qt5 library:

        Issue:- Giving error of qt5 dll file why? qt5xml, qt5svg, qt5sql.dll etc.

        So you somehow loaded the Qt5 qgis stuff. You can not mix it. It's up to you to make sure to use the correct ones - what should we do here?
        You can check which dlls are loaded from which dependency with e.g. Dependencies

        A Offline
        A Offline
        Aman55
        wrote on last edited by
        #3

        @Christian-Ehrlicher Error of qt5 has been resolved thanks.

        The new error arises as QGIS Entry Point Not Found
        Screenshot (12).png

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved