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

Ismail Sunni imajimatika at gmail.com
Wed Aug 5 01:08:37 PDT 2020


Yes, it's possible to run QGIS using WSL2. I have it running in my Windows.

My colleague, Rizky, writes a note about it here
https://github.com/lucernae/wsl2-qgis

Perhaps, it also possible to develop QGIS by using WSL2 on Windows

Best regards.

On Wed, Aug 5, 2020 at 9:42 AM BELGACEM NEDJIMA <gb_nedjima at esi.dz> wrote:

> I actually looked into WSL and WSL2 but its intended use is command line
> executables which is not the case for QGIS. I read somewhere that you can
> run GUI apps from WSL by using a third party X server (you can think of it
> as a remote display application) but it's kinda inefficient and I think it
> will require more work than what you'll need if you just switch to linux.
>
> If after trying you didn't get anything working on Windows and ended up
> having to switch to linux. I recommend KDE environment (I'm using Kubuntu).
> I was using windows for everything until 3 months ago and KDE UI made the
> transition much easier for me.
>
> Best wishes,
>
>
> On Wed, Aug 5, 2020, 8:20 AM Charles Dixon-Paver <charles at kartoza.com>
> wrote:
>
>> If you are wanting to use Linux functionality directly within Windows 10,
>> Microsoft has introduced Windows Subsystem for Linux. If you're having
>> trouble with Visual Studio but want to stick with Windows it's perhaps a
>> feasible solution.
>>
>> https://docs.microsoft.com/en-us/windows/wsl/about
>>
>> Regards
>>
>> On Wed, 5 Aug 2020 at 01:50, BELGACEM NEDJIMA <gb_nedjima at esi.dz> wrote:
>>
>>> 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
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
> 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



-- 
Ismail Sunni
Software Engineer
ismailsunni.id
ismailsunni.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20200805/2ccff0d5/attachment-0001.html>


More information about the QGIS-Developer mailing list