[QGIS-Developer] Cannot load QGIS source code in QTCreator

Alessandro Pasotti apasotti at gmail.com
Sat Nov 17 02:16:28 PST 2018


On Thu, Nov 15, 2018 at 10:09 AM Andrea Aime <andrea.aime at geo-solutions.it>
wrote:

> Thanks everybody for the followup! I'm answering this mail but I'll
> integrate comments about the others too.
>
> On Thu, Nov 15, 2018 at 8:26 AM Alessandro Pasotti <apasotti at gmail.com>
> wrote:
>
>> Hi Andrea,
>>
>> I've never seen that particular error, I'd look into cmake installation
>> and/or version.
>>
>
> See below
>
>
>> The vast majority of QGIS C++ developers uses Qt Creator on a daily basis
>> on different platforms, what work for me here is:
>>
>> Ubuntu xenial
>>
>> QtCreator: 4.7.2 installed from https://www.qt.io/download
>> cmake version 3.10.2 self-built from sources
>> Qt 10.0.1 self-built from sources
>>
>> Notice that none of the above was installed with apt, the main reason is
>> that xenial is a little bit old, but IIRC that was also to avoid some
>> problems in the integration of the different components.
>>
>
> I see... on my machine I have everything installed from apt instead,
> versions are:
>
>    - QT Creator 4.5.2
>    - cmake 3.10.2
>    - QT is 5.9.5 (you have QT 10 instead??)
>
>
You should be good with 5.9, I have several kits with different QT versions
in release or debug mode, this is the script I use to build them:
http://termbin.com/froy



>  In other comments I've been invited to build from sources using cmake,
> which I did, worked, but then trying to start qgis as built results in this:
>
> aaime at colossus ~/devel/qgis/build-master (master) $ export
> LD_LIBRARY_PATH=/home/aaime/apps/lib
>
>
[...]

You might need some more env vars, here is an example of a run script of
mines: http://termbin.com/us9x note that I never run make/ninja install but
I run everything directly from the output dir under the build dir.


> I'm starting to think I'd be better of using a virtual machine where one
> can do any custom setup required.
> Someone was hinting at a video showing how to do that, using a vagrant
> setup. Is the same also documented anywhere, like,
> in text form?
>
>
Not that I'm aware of, but depending on your needs, you might find it
useful a docker recipe to build qgis from sources:
https://github.com/qgis/QGIS/blob/master/.docker/qgis.dockerfile

Btw, a Vagrant recipe to build a QGIS development environment ready to go
would be IMO very welcome and would low barriers for new developers.

Cheers

--
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20181117/dbb64472/attachment.html>


More information about the QGIS-Developer mailing list