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

Tim Sutton lists at linfiniti.com
Fri Aug 17 21:23:57 PDT 2012


Hi

On Fri, Aug 17, 2012 at 3:34 PM, Tasos Varoudis <null at archtech.gr> wrote:
> PLease ignore my other email. I did something wrong!
>
> Thank you all for your help!
> Tasos
>

Glad you got it working!

Tim


>
> On 17 Aug 2012, at 12:35, Tasos Varoudis <null at archtech.gr> wrote:
>
> Ubuntu build went OK! Thanks!
>
> Now taking the example from the QgisCoding document. I get this error:
>
> qgspointconverterplugin.o: In function
> `QgsPointConverterPluginT::QgsPointConverterPluginT(QgisInterface*)':
> qgspointconverterplugin.cpp:(.text+0xd0): multiple definition of
> `QgsPointConverterPluginT::QgsPointConverterPluginT(QgisInterface*)'
> qgspointconverterplugin.o:qgspointconverterplugin.cpp:(.text+0xd0): first
> defined here
> qgspointconverterplugin.o: In function `non-virtual thunk to
> QgsPointConverterPluginT::~QgsPointConverterPluginT()':
> qgspointconverterplugin.cpp:(.text+0x440): multiple definition of
> `non-virtual thunk to QgsPointConverterPluginT::~QgsPointConverterPluginT()'
> qgspointconverterplugin.o:qgspointconverterplugin.cpp:(.text+0x440): first
> defined here
>
> a lot of them....
>
> Ideas?
>
> Best,
> Tasos
>
> On 17 Aug 2012, at 09:57, Marco Bernasocchi <marco at bernawebdesign.ch> wrote:
>
> 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
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list