Re: [Qgis-developer] Write custom c++ application using QGIS under windows
Hi, First you must download packages listed below from OSGeo4w ( http://qgis.org/en/site/forusers/download.html OSGeo4W Network Installer (32 or 64 bit)): - qgis: QGIS desktop - grass: GRASS GIS - qgis-devel - qt4-devel - qt4-doc - qt4-libs - qwt-devel-qt4 - qwt-doc-qt - qwt-libs-qt4 In the post of Denis just replace: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis-dev\include With: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis\include (replace qgis-dev with qgis) And if you want to build 64 bits applications with visual studio 2010 replace: set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ call C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86 with: call %PF86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat amd64 if exist c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd call c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd /x64 /Release path %path%;%PF86%\Microsoft Visual Studio 10.0\VC\bin set SETUPAPI_LIBRARY=%PF86%\Microsoft SDKs\Windows\v7.0A\Lib\x64\SetupAPI.Lib if not exist %SETUPAPI_LIBRARY% set SETUPAPI_LIBRARY=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Lib\x64\SetupAPI.lib Cheers, Nejia -Message d'origine- De : qgis-developer-boun...@lists.osgeo.org [mailto:qgis-developer-boun...@lists.osgeo.org] De la part de eliu1234 Envoyé : mardi 18 novembre 2014 00:15 À : qgis-developer@lists.osgeo.org Objet : Re: [Qgis-developer] Write custom c++ application using QGIS under windows I saw your post on this. And I actually used this .proj file. However, with all of your include directory, the header files qgisapplication.h does not exist in anyone of them. This is why I am confused about where it can be. Re: Write custom c++ application using QGIS under windows Nov 17, 2014; 5:47pm — by 3nids 3nids Hi, I wrote a post about that: http://3nids.wordpress.com/2014/02/27/build-and-deploy-c-qgis-app-on-windows/ I hope it helps Denis Le mardi 18 novembre 2014, eliu1234 [hidden email] a écrit : Thanks for the reply. So after that, I should just include the directory containing the header files in .proj? I tried to do this, however, i get the error in the following stackoverflow post: http://stackoverflow.com/questions/26597253/syntax-error-in-qgsapplication-h -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173395.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@... http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/qgis-developer javascript:; -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173412.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
Thanks so much for the answer. I am able to get the 32 bit version working. Right now, I am facing the problem of not able to run debug mode. Since all those xd.lib files does not exist with the OSGeo4W installation. Do you have any idea how to fix this? And right now, I cannot seem to print anything in this mode. I tried to use cout but my output line is not printed. I tried to setup using visual studio. But is unsure how to include these dll files without their corresponding library files. Do you have any idea on this? Thanks. In Reply To Re: Write custom c++ application using QGIS under windows Nov 18, 2014; 7:43am — by Nejia Nejia Hi, First you must download packages listed below from OSGeo4w ( http://qgis.org/en/site/forusers/download.html OSGeo4W Network Installer (32 or 64 bit)): - qgis: QGIS desktop - grass: GRASS GIS - qgis-devel - qt4-devel - qt4-doc - qt4-libs - qwt-devel-qt4 - qwt-doc-qt - qwt-libs-qt4 In the post of Denis just replace: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis-dev\include With: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis\include (replace qgis-dev with qgis) And if you want to build 64 bits applications with visual studio 2010 replace: set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ call C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86 with: call %PF86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat amd64 if exist c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd call c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd /x64 /Release path %path%;%PF86%\Microsoft Visual Studio 10.0\VC\bin set SETUPAPI_LIBRARY=%PF86%\Microsoft SDKs\Windows\v7.0A\Lib\x64\SetupAPI.Lib if not exist %SETUPAPI_LIBRARY% set SETUPAPI_LIBRARY=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Lib\x64\SetupAPI.lib Cheers, Nejia -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173692.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
hi eliu1234, The *.lib of QGIS should be created by compile. For the Qt's lib , e.g *d.lib. The qwt should download from OSGeo4W, so the qwt5.lib should found in OSGeo4W. The rest qt related packages should just install a Qt from http://qt-project.org/, when compiling API using cmake, it can automatically check the QT you installed before. Remember, the minimum version of QT QGIS-2X need is 4.7.0. hope this help. Date: Tue, 18 Nov 2014 15:04:34 -0800 From: lby20...@hotmail.com To: qgis-developer@lists.osgeo.org Subject: Re: [Qgis-developer] Write custom c++ application using QGIS under windows Thanks so much for the answer. I am able to get the 32 bit version working. Right now, I am facing the problem of not able to run debug mode. Since all those xd.lib files does not exist with the OSGeo4W installation. Do you have any idea how to fix this? And right now, I cannot seem to print anything in this mode. I tried to use cout but my output line is not printed. I tried to setup using visual studio. But is unsure how to include these dll files without their corresponding library files. Do you have any idea on this? Thanks. In Reply To Re: Write custom c++ application using QGIS under windows Nov 18, 2014; 7:43am ― by Nejia Nejia Hi, First you must download packages listed below from OSGeo4w ( http://qgis.org/en/site/forusers/download.html OSGeo4W Network Installer (32 or 64 bit)): - qgis: QGIS desktop - grass: GRASS GIS - qgis-devel - qt4-devel - qt4-doc - qt4-libs - qwt-devel-qt4 - qwt-doc-qt - qwt-libs-qt4 In the post of Denis just replace: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis-dev\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis-dev\include With: @set PATH=%OSGEO4W_ROOT%\bin;%OSGEO4W_ROOT%\apps\qgis\bin;%PATH% @set INCLUDE=%INCLUDE%;%OSGEO4W_ROOT%\include;%OSGEO4W_ROOT%\apps\qgis\include (replace qgis-dev with qgis) And if you want to build 64 bits applications with visual studio 2010 replace: set VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\ call C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86 with: call %PF86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat amd64 if exist c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd call c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd /x64 /Release path %path%;%PF86%\Microsoft Visual Studio 10.0\VC\bin set SETUPAPI_LIBRARY=%PF86%\Microsoft SDKs\Windows\v7.0A\Lib\x64\SetupAPI.Lib if not exist %SETUPAPI_LIBRARY% set SETUPAPI_LIBRARY=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1\Lib\x64\SetupAPI.lib Cheers, Nejia -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173692.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
On 11/17/14 9:50 AM, eliu1234 wrote: Anyone was able to write qgis c++ application under Windows? The problem that I am encountering is that header files such as qgsapplication.h cannot be found. I have installed qgis 2.6 and those files actually do not exist. What do I need to do in order to find these header files so I can do C++ programming under windows? My .pro file can be found at the following stackoverflow post: http://stackoverflow.com/questions/26920574/cannot-find-qgsapplication-h-and-other-header-files You need to install the QGIS source in order to get the header files. See the SOURCES tab on http://qgis.org/en/site/forusers/download.html for how to get it. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-= Gary Sherman Founder, QGIS Project Consulting: geoapt.com Publishing: locatepress.com We work virtually anywhere =-=-=-=-=-=-=-=-=-=-=-=-=-=-= ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
Thanks for the reply. So after that, I should just include the directory containing the header files in .proj? I tried to do this, however, i get the error in the following stackoverflow post: http://stackoverflow.com/questions/26597253/syntax-error-in-qgsapplication-h -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173394.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
Thanks for the reply. So after that, I should just include the directory containing the header files in .proj? I tried to do this, however, i get the error in the following stackoverflow post: http://stackoverflow.com/questions/26597253/syntax-error-in-qgsapplication-h -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173395.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
Hi, I wrote a post about that: http://3nids.wordpress.com/2014/02/27/build-and-deploy-c-qgis-app-on-windows/ I hope it helps Denis Le mardi 18 novembre 2014, eliu1234 lby20...@hotmail.com a écrit : Thanks for the reply. So after that, I should just include the directory containing the header files in .proj? I tried to do this, however, i get the error in the following stackoverflow post: http://stackoverflow.com/questions/26597253/syntax-error-in-qgsapplication-h -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173395.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org javascript:; http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
I saw your post on this. And I actually used this .proj file. However, with all of your include directory, the header files qgisapplication.h does not exist in anyone of them. This is why I am confused about where it can be. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173411.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Write custom c++ application using QGIS under windows
I saw your post on this. And I actually used this .proj file. However, with all of your include directory, the header files qgisapplication.h does not exist in anyone of them. This is why I am confused about where it can be. Re: Write custom c++ application using QGIS under windows Nov 17, 2014; 5:47pm — by 3nids 3nids Hi, I wrote a post about that: http://3nids.wordpress.com/2014/02/27/build-and-deploy-c-qgis-app-on-windows/ I hope it helps Denis Le mardi 18 novembre 2014, eliu1234 [hidden email] a écrit : Thanks for the reply. So after that, I should just include the directory containing the header files in .proj? I tried to do this, however, i get the error in the following stackoverflow post: http://stackoverflow.com/questions/26597253/syntax-error-in-qgsapplication-h -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173395.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@... http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/qgis-developer javascript:; -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Write-custom-c-application-using-QGIS-under-windows-tp5173377p5173412.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer