QGiS Windows Source Build
-
@abhishek999 Currently what I am doing is that rebuilding QGiS using MSVC
If I get anything relevant and the steps starts to works
I will share it here
Please do the same (sharing it here) if you get anything or procedure that has to be followed -
@Christian-Ehrlicher Surprisingly who you just replied is not the OP :) but they are making, or were making the same mistake.
-
here is the kit that i have selcted
![Screenshot (12).png]and i am getting this error @jsulm @Christian-Ehrlicher
(https://ddgobkiprc33d.cloudfront.net/a0de40c2-7bda-4422-ab48-b948de7f128c.png)
-
@abhishek999 Please post errors as text, not pictures.
You should search for the first error or post the whole build log here as text. -
@abhishek999
You posted just this and I tried to answer in your annoying post at https://forum.qt.io/topic/159740/qt-creator-and-qgis-integration-problem/2. But you have ignored that. So in addition to calling everyone out by name there to answer your question you then don't respond to answers there and have another topic running with same question here, and people answer in one place and don't know you are making them also answer in another. Do you see how irritating this for people trying to respond to you? -
@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?
-
@abhishek999 You're not linking properly one of the required libs. Please show your pro file (as text).
-
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
-
@abhishek999 What exact Qt version did you use to build QGIS? Is it the same you're using to build the application?
-
@abhishek999 You did not answer the second question.
-
@jsulm
qt version 5.15.2
qgis version QGIS 3.34.12pro 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
-
@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 +="
-
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.
-
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. -
@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...
-
@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.
-
@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?