[Qgis-user] Customized QGIS C++ application development in Windows
rguru
rguru.k at gmail.com
Fri Mar 21 21:49:51 PDT 2025
Hi,
I am developing a custom map viewer using Qt, C++, QWidgets and QGIS API. I
am not trying to compile QGIS source code. I am trying to show a vector map
using Qt.
For LTR version 3.34.10
1. Installed Visual Studio 2019 community edition (Desktop Development with
C++")
2. Installed qgis-ltr-deps using OSGeo4W network installer
3. Able to include headers
4. I have included my pro file as pro1.pro
Result: Getting lots of compilation errors. I have tried with Visual studio
2019 compiler and MinGW 64 bit. Getting errors in both cases.
I have already gone through the steps available on the internet and tried
ChatGPT. Kindly help me to make a simple map viewer in windows. Thanks in
advance.
Rguru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250322/dfdf30ae/attachment.htm>
-------------- next part --------------
QT += core gui widgets xml
CONFIG += c++17
UI_DIR = ./UI
MOC_DIR = ./MOC
OBJECTS_DIR = ./OBJ
TARGET = IEWS_MAP
TEMPLATE = app
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += _USE_MATH_DEFINES
DEFINES += QT_NO_KEYWORDS
DEFINES += CORE_EXPORT= GUI_EXPORT=
DEFINES += CORE_EXPORT=__declspec(dllimport) GUI_EXPORT=__declspec(dllimport)
SOURCES += \
display2d.cpp \
main.cpp
HEADERS += \
display2d.h
FORMS += \
display2d.ui
win32 {
LIBS += -lws2_32
}
OSGEO_QT_LIB_PATH = C:/OSGeo4W/apps/Qt5/lib/
OSGEO_QGIS_LIB_PATH = C:/OSGeo4W/apps/qgis-ltr/lib/
OSGEO_INCLUDE_PATH = C:/OSGeo4W/apps/Qt5/include
OSGEO_QGIS_INCLUDE_PATH = C:/OSGeo4W/apps/qgis-ltr/include
win32 {
INCLUDEPATH += C:/OSGeo4W/apps/qgis-ltr/include
LIBS += -L"C:/OSGeo4W/apps/qgis-ltr/lib/" -lqgis_core -lqgis_gui
INCLUDEPATH += C:/OSGeo4W/apps/Qt5/include
LIBS += -L"C:/OSGeo4W/apps/Qt5/lib/" -lQt5Core -lQt5Gui
}
More information about the QGIS-User
mailing list