[Qgis-developer] problems building c++ qgis plugin and/or qgis
Marco Bernasocchi
marco at bernawebdesign.ch
Fri Aug 17 01:57:53 PDT 2012
On 08/17/2012 10:43 AM, Tasos Varoudis wrote:
> Any tips for which is the easiest platform to develop? Linux distro version or other? compiling QGIS from scratch on my mac and ubuntu 12.04 is a problem.
>
how exactly a prolem on ubuntu?
I do:
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get build-dep qgis
sudo apt-get install cmake-curses-gui
git clone git://github.com/qgis/Quantum-GIS.git
cd Quantum-GIS
mkdir build
cd build
ccmake ..
make
hope it helps ciao
MArco
> Best,
> Tasos
>
> PS: I have done the cmake(bug fix) trick but no-go.
>
> On 16 Aug 2012, at 15:37, William Kyngesburye <woklist at kyngchaos.com> wrote:
>
>> On Aug 16, 2012, at 8:57 AM, Tasos Varoudis wrote:
>>
>>>
>>> On 16 Aug 2012, at 14:34, William Kyngesburye <woklist at kyngchaos.com> wrote:
>>>
>>>> On Aug 16, 2012, at 7:23 AM, Tasos Varoudis wrote:
>>>>
>>>>>
>>>> For OS X, if you want cmake to find your Homebrew libraries instead of the standard frameworks, you need to add to your cmake command:
>>>>
>>>> -D CMAKE_FIND_FRAMEWORK=LAST
>>>>
>>>> BUT, there is a bug in cmake currently that this setting is completely ignored. You will have to either apply the patch mentioned in the bug report to your cmake source and recompile cmake, or install cmake from dev sources.
>>>>
>>>> http://public.kitware.com/Bug/view.php?id=13261
>>>>
>>>> Also, for building external plugins for QGIS on OS X, QGIS libs are frameworks, so you can't link your plugin with the -l flags, that's why you're getting linking errors. But the QGIS frameworks bundled in the app aren't suitable for linking, so you need to tell cmake to install dev frameworks with:
>>>>
>>>> -D QGIS_MACAPP_INSTALL_DEV=TRUE
>>>>
>>>> These will install in /Library/Frameworks, so all you need to do for your plugin is link with:
>>>>
>>>> -framework qgis_core -framework qgis_gui
>>>>
>>>> You don't need '-L//Users/varoudis/Desktop/Projects/Quantum-GIS/lib' (assuming you extracted them from the app to there).
>>>>
>>>> -----
>>>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>>>> http://www.kyngchaos.com/
>>>>
>>>> The equator is so long, it could encircle the earth completely once.
>>>>
>>>
>>>
>>>> so you need to tell cmake to install dev frameworks with:
>>>>
>>>> -D QGIS_MACAPP_INSTALL_DEV=TRUE
>>>
>>> tell cake during QGIS building from source? so building the source is my only way in order to build a plugin?! right?
>>>
>> I thought that's what you were doing anyways? But yes, I don't package the dev frameworks with my QGIS installer, so you need to compile QGIS to get them.
>>
>> It *may* work if you copy the frameworks out of the QGIS app to /Library/Frameworks. The main problem I found is some versions of the Xcode tools may fail to link those because of the relative paths embedded in them.
>>
>> -----
>> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
>> http://www.kyngchaos.com/
>>
>> "We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty."
>>
>> "Don't you even hate 'em?"
>>
>> "What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day."
>>
>> <Ha, ha> "And it might give 'em all stomach ulcers."
>>
>> - Tarzan, on war
>>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
--
Marco Bernasocchi
http://opengis.ch
More information about the Qgis-developer
mailing list