Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGiS Windows Source Build
Forum Updated to NodeBB v4.3 + New Features

QGiS Windows Source Build

Scheduled Pinned Locked Moved Unsolved General and Desktop
42 Posts 7 Posters 6.4k Views 1 Watching
  • 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
    abhishek999
    wrote on last edited by
    #27

    @JonB
    Apologies for the confusion. I’ve deleted the previous post and will keep my questions in one place from now on.

    I successfully included the library, but when I try to display the map in Qt, I encounter the following error (see screenshot). Any suggestions on how to resolve this issue?
    Screenshot 2.jpeg

    jsulmJ 1 Reply Last reply
    0
    • A abhishek999

      @JonB
      Apologies for the confusion. I’ve deleted the previous post and will keep my questions in one place from now on.

      I successfully included the library, but when I try to display the map in Qt, I encounter the following error (see screenshot). Any suggestions on how to resolve this issue?
      Screenshot 2.jpeg

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #28

      @abhishek999 You're not linking properly one of the required libs. Please show your pro file (as text).

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        abhishek999
        wrote on last edited by abhishek999
        #29

        @jsulm

        
        QT += core gui widgets xml
        
        CONFIG += c++17
        
        # QGIS include directory
        INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr/include
        INCLUDEPATH += C:/OSGeo4W/apps/qgis/bin
        INCLUDEPATH += C:/OSGeo4W/apps/Qt5/bin
        INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr/include/qgis
        INCLUDEPATH += C:/OSGeo4W/share/proj/proj.db
        
        # QGIS library directory with required libraries
        LIBS += -LC:/OSGeo4W/apps/qgis-ltr/lib -lqgis_core -lqgis_gui -lqgis_analysis -lqgis_3d -lqgis_native
        
        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
        
        jsulmJ 1 Reply Last reply
        0
        • A abhishek999

          @jsulm

          
          QT += core gui widgets xml
          
          CONFIG += c++17
          
          # QGIS include directory
          INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr/include
          INCLUDEPATH += C:/OSGeo4W/apps/qgis/bin
          INCLUDEPATH += C:/OSGeo4W/apps/Qt5/bin
          INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr/include/qgis
          INCLUDEPATH += C:/OSGeo4W/share/proj/proj.db
          
          # QGIS library directory with required libraries
          LIBS += -LC:/OSGeo4W/apps/qgis-ltr/lib -lqgis_core -lqgis_gui -lqgis_analysis -lqgis_3d -lqgis_native
          
          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
          
          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #30

          @abhishek999 What exact Qt version did you use to build QGIS? Is it the same you're using to build the application?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • jsulmJ jsulm

            @abhishek999 What exact Qt version did you use to build QGIS? Is it the same you're using to build the application?

            A Offline
            A Offline
            abhishek999
            wrote on last edited by
            #31

            @jsulm i am using qt 5.15.2

            jsulmJ 1 Reply Last reply
            0
            • A abhishek999

              @jsulm i am using qt 5.15.2

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #32

              @abhishek999 You did not answer the second question.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                abhishek999
                wrote on last edited by
                #33

                @jsulm
                qt version 5.15.2
                qgis version QGIS 3.34.12

                pro file

                QT       += core gui
                
                greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                
                CONFIG += c++17
                # QGIS include directory
                
                # QGIS include directory
                INCLUDEPATH += C:/OSGeo4W/include
                INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr-dev/include
                INCLUDEPATH += C:/Qt/5.15.0/msvc2019_64/include/QtXml
                
                # QGIS library directory with required libraries
                LIBS += -LC:/OSGeo4W/apps/qgis-ltr-dev/lib -lqgis_core -lqgis_gui -lqgis_analysis -lqgis_3d -lqgis_native
                
                
                
                # 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 \
                
                
                
                # 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
                Screenshot (16).png

                jsulmJ Pl45m4P 2 Replies Last reply
                0
                • A abhishek999

                  @jsulm
                  qt version 5.15.2
                  qgis version QGIS 3.34.12

                  pro file

                  QT       += core gui
                  
                  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                  
                  CONFIG += c++17
                  # QGIS include directory
                  
                  # QGIS include directory
                  INCLUDEPATH += C:/OSGeo4W/include
                  INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr-dev/include
                  INCLUDEPATH += C:/Qt/5.15.0/msvc2019_64/include/QtXml
                  
                  # QGIS library directory with required libraries
                  LIBS += -LC:/OSGeo4W/apps/qgis-ltr-dev/lib -lqgis_core -lqgis_gui -lqgis_analysis -lqgis_3d -lqgis_native
                  
                  
                  
                  # 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 \
                  
                  
                  
                  # 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
                  Screenshot (16).png

                  jsulmJ Online
                  jsulmJ Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #34

                  @abhishek999 This also does not answer my question.
                  Again: did you use same Qt version to build QGIS as you use to build your app?

                  And why do you have this in your pro file:

                  INCLUDEPATH += C:/Qt/5.15.0/msvc2019_64/include/QtXml
                  

                  There is no need to add Qt include folders to the include path, you just have to enable the Qt modules you want to use in "QT +="

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • A abhishek999

                    @jsulm
                    qt version 5.15.2
                    qgis version QGIS 3.34.12

                    pro file

                    QT       += core gui
                    
                    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
                    
                    CONFIG += c++17
                    # QGIS include directory
                    
                    # QGIS include directory
                    INCLUDEPATH += C:/OSGeo4W/include
                    INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr-dev/include
                    INCLUDEPATH += C:/Qt/5.15.0/msvc2019_64/include/QtXml
                    
                    # QGIS library directory with required libraries
                    LIBS += -LC:/OSGeo4W/apps/qgis-ltr-dev/lib -lqgis_core -lqgis_gui -lqgis_analysis -lqgis_3d -lqgis_native
                    
                    
                    
                    # 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 \
                    
                    
                    
                    # 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
                    Screenshot (16).png

                    Pl45m4P Offline
                    Pl45m4P Offline
                    Pl45m4
                    wrote on last edited by Pl45m4
                    #35

                    @abhishek999

                    You say you are using Qt 5.15.2 but your include path says Qt 5.15.0? Which one is correct?

                    And post code as text, don't post images please.


                    If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                    ~E. W. Dijkstra

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      abhishek999
                      wrote on last edited by
                      #36

                      i reinstall qt and my version Qt 5.15.0 now.
                      @jsulm i did not understand can you please tell me wich version i have to use if i am using Qt 5.15.0 and along with download link.

                      jsulmJ Pl45m4P 2 Replies Last reply
                      0
                      • A abhishek999

                        i reinstall qt and my version Qt 5.15.0 now.
                        @jsulm i did not understand can you please tell me wich version i have to use if i am using Qt 5.15.0 and along with download link.

                        jsulmJ Online
                        jsulmJ Online
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #37

                        @abhishek999 said in QGiS Windows Source Build:

                        can you please tell me wich version i have to use if i am using Qt 5.15.0

                        Use same Qt version to build QGIS and your app...

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • A abhishek999

                          i reinstall qt and my version Qt 5.15.0 now.
                          @jsulm i did not understand can you please tell me wich version i have to use if i am using Qt 5.15.0 and along with download link.

                          Pl45m4P Offline
                          Pl45m4P Offline
                          Pl45m4
                          wrote on last edited by
                          #38

                          @abhishek999 said in QGiS Windows Source Build:

                          i did not understand can you please tell me wich version i have to use if i am using Qt 5.15.0 and along with download link.

                          It doesn't matter which version exactly, as long as it works... The important thing is that you use the same to build QGIS and your programs.


                          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                          ~E. W. Dijkstra

                          A 1 Reply Last reply
                          0
                          • Pl45m4P Pl45m4

                            @abhishek999 said in QGiS Windows Source Build:

                            i did not understand can you please tell me wich version i have to use if i am using Qt 5.15.0 and along with download link.

                            It doesn't matter which version exactly, as long as it works... The important thing is that you use the same to build QGIS and your programs.

                            A Offline
                            A Offline
                            abhishek999
                            wrote on last edited by
                            #39

                            @Pl45m4 @jsulm
                            QGIS is built in qt 5.15.13
                            but this version is not showing in qt installer 5.15.2,5.15.1,5.15.0 are available in installer how i download this version

                            jsulmJ 1 Reply Last reply
                            0
                            • A abhishek999

                              @Pl45m4 @jsulm
                              QGIS is built in qt 5.15.13
                              but this version is not showing in qt installer 5.15.2,5.15.1,5.15.0 are available in installer how i download this version

                              jsulmJ Online
                              jsulmJ Online
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #40

                              @abhishek999 said in QGiS Windows Source Build:

                              how i download this version

                              You need a commercial license for that version or you build that version by yourself. But it should also work if you use Qt 5.15.2 for your app.
                              Was QGIS built using MSVC or MinGW?

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              X 1 Reply Last reply
                              1
                              • jsulmJ jsulm

                                @abhishek999 said in QGiS Windows Source Build:

                                how i download this version

                                You need a commercial license for that version or you build that version by yourself. But it should also work if you use Qt 5.15.2 for your app.
                                Was QGIS built using MSVC or MinGW?

                                X Offline
                                X Offline
                                xanthas
                                wrote on last edited by
                                #41

                                @jsulm QGiS which version should be worked with Qt 5.15.2?

                                jsulmJ 1 Reply Last reply
                                0
                                • X xanthas

                                  @jsulm QGiS which version should be worked with Qt 5.15.2?

                                  jsulmJ Online
                                  jsulmJ Online
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #42

                                  @xanthas See https://github.com/qgis/QGIS/blob/master/INSTALL.md
                                  Yes, 5.15.2 is supported.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  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