[Qgis-developer] problems building c++ qgis plugin and/or qgis

Tasos Varoudis null at archtech.gr
Thu Aug 16 06:57:53 PDT 2012


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?

Thanks
Tasos



More information about the Qgis-developer mailing list