[QGIS-Developer] How to setup Visual Studio 2019 environment for QGIS C++ development?

BELGACEM NEDJIMA gb_nedjima at esi.dz
Tue Aug 4 16:49:56 PDT 2020


Hi,
Here is some explanation about making .sln files for QGIS project.
QGIS uses CMake to generate the .sln file. Ideally in a simple CMake
project you run CMake where the CMakeFiles.txt is located (usually at the
root of the source tree) and provide paths to the external libraries you
use the you generate .sln files and build the project normally but since
QGIS uses a lots of libraries some of them don't support Visual Studio well
and you end up having some really complicated error messages.
About 3 months ago I tried to use visual studio 2019 and changed somethings
in the build script. I managed to generate solution files but QGIS couldn't
compile. I ended up having to switch to linux.
I hope you find a solution soon.


On Tue, Aug 4, 2020, 10:48 PM <tomjan at gmx.com> wrote:

> Hi Ismail and thank you for your link to the pull request.
> Currently that PR has not been accepted, because of some checks not being
> successful.
>
> I do not really know exactly what that pull request is trying to do (but
> as many as 42 files seem to be involved in the PR) but as far as I can see
> it does not include a ".sln" file (Visual Studio solution file) nor any
> ".vcxproj" files (Visual C++ project files) nor a file "packages.config"
> (for NuGet managed libraries).
>
> I think I read somewhere here in the QGIS developer list archive that
> someone estimated that 90% percent of the QGIS developers are using Linux.
> If that is true then I believe the reason might be that Windows developers
> (which are used to NuGet and Visual Studio solutions files and project
> files) may choose to give up when they feel it seems difficult to even get
> started with the development environment for QGIS with Windows.
>
> Can anyone answer this question:
> Would it, for some reason, be impossible to provide a Visual Studio
> solution file (and .vcxproj files) that can simply be opened, and then the
> required dependencies would be retrieved automatically with NuGet
> (according to NuGet references in the ".vcxproj" files or
> "packages.config") ?
> One obvious reason could be that there may be some required libraries
> which are not available through NuGet but those kind of files therefore
> really will need a manual installation.
> But I mean is it possible to provide easy instructions with only very FEW
> manual installations for Windows, and then the majority of the dependencies
> would be retrieved through NuGet when you open a Visual Studio solution
> file which hopefully would be available from the github repository?
>
> The only kind of libraries I myself have used with NuGet is .NET libraries
> but as far as I understand, NuGet can also be used for native C++ libraries:
> https://devblogs.microsoft.com/nuget/native-support/
>
> I believe that the QGIS project would get more contributors if you can
> provide a development environment that are EASY to GET STARTED WITH for
> potential newcomers using Windows Visual Studio.
>
>   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
>
>
> Sent: Tuesday, August 04, 2020 at 12:22 AM
> From: "Ismail Sunni" <imajimatika at gmail.com>
> To: tomjan at gmx.com
> Cc: "QGIS Developer List" <qgis-developer at lists.osgeo.org>
> Subject: Re: [QGIS-Developer] How to setup Visual Studio 2019 environment
> for QGIS C++ development?
>
> Hi Tomjan,
>
> Perhaps you want to see this PR https://github.com/qgis/QGIS/pull/38102
> for your question.
>  Best regards
>
>
> On Mon, Aug 3, 2020, 23:44 <tomjan at gmx.com[mailto:tomjan at gmx.com]> wrote:
>
> I would be interested in learning to contribute to QGIS.
> My previous C++ experience is that about 20 years ago I did some (for a
> couple of years) Visual C++ programming with Microsoft's MFC as the GUI.
> Now I think I could refresh my C++ skills and also learn QT which I have
> never programmed with so far.
>
> However, I am not a Linux user, but always have been using Windows
> (currently Windows 10).
> It seems to be a complicated obstacle to get started running QGIS through
> Visual Studio 2019.
>
> I think it would be great with a tutorial (webpage or youtube video
> tutorial) about how to get started with an example showing how to do all
> necessary installations/configurations/setup until you can compile and run
> QGIS with a breakpoint in Visual Studio 2019.
>
> I have seen that the "INSTALL" file in the repository refers to Visual
> Studio 2015, but it seems awkward if it really would be necessary to use
> such an ancient version?
> Is nobody of the QGIS developers using Visual Studio 2019?
>  _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org[mailto:QGIS-Developer at lists.osgeo.org]
> List info:
> https://lists.osgeo.org/mailman/listinfo/qgis-developer[https://lists.osgeo.org/mailman/listinfo/qgis-developer]
> Unsubscribe:
> https://lists.osgeo.org/mailman/listinfo/qgis-developer[https://lists.osgeo.org/mailman/listinfo/qgis-developer]
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200805/ffe041dd/attachment.html>


More information about the QGIS-Developer mailing list