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

Tasos Varoudis null at archtech.gr
Thu Aug 16 05:23:10 PDT 2012


Hello all,

I have been trying to build a qgis C++ plugin with no success… in different test platforms too (including building qgis from source).

I started by doing the simple steps in the QGIS Compile/Style document for 1.6.0 (i think) and using as a QGIS_DIR path all possible combination and hacks… Qgis App dir, Qgis source dir from github(without building it, a hybrid folder with Qgis source and "lib" folder from the App dir to cheat without building.
But I had no success.

(python is a no-go!)

I end up getting this: (of course with the 'hacked' lib folder)
##########################
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.6 -single_module -dynamiclib -compatibility_version	1.0 -current_version	1.0.0 -install_name	libMyQGISDemoPlugin.dylib.1 -o libMyQGISDemoPlugin.dylib.1.0.0 qgspointconverterplugin.o qgspointconverterplugin.o moc_qgspointconverterplugin.o -F/Library/Frameworks -L/Library/Frameworks -L//Users/varoudis/Desktop/Projects/Quantum-GIS/lib -lqgis_core -lqgis_gui -framework Qt3Support -framework QtXml -framework QtGui -framework QtCore
Undefined symbols for architecture x86_64:
"QgsFeature::QgsFeature(long long, QString)", referenced from:
QgsPointConverterPlugin::convertToPoint() in qgspointconverterplugin.o
QgsPointConverterPlugin::convertToPoint() in qgspointconverterplugin.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [libMyQGISDemoPlugin.dylib.1.0.0] Error 1
make: Leaving directory `/Users/varoudis/Dropbox/Git/Other/MyQGISDemoPlugin/MyQGISDemoPlugin-build-desktop-Qt_4_8_2_in_PATH__System__Debug'
12:48:06: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project MyQGISDemoPlugin (target: Desktop)
When executing step 'Make'
##########################

I tried to do all the lame hacks because I have tried to build Qgis from source in both MACOSX10.8 and Ubuntu12.04 with no luck!
Im not sure if I do something wrong. Im not that inexperienced in *nix systems...


MacOSX 10.8 with homebrew:
grass building is a problem…
geos is there:
brew -v info geos 
Homebrew 0.9.2
geos: stable 3.3.5
http://trac.osgeo.org/geos
/usr/local/Cellar/geos/3.3.5 (367 files, 8.8M) *
https://github.com/mxcl/homebrew/commits/master/Library/Formula/geos.rb

#############
bart150-115:Quantum-GIS varoudis$ cmake .
-- Quantum GIS version: 1.9.0 Master (10900)
-- Could not find GRASS
-- Found Iconv: /usr/lib/libiconv.dylib
-- Found Proj: /Library/Frameworks/PROJ.framework
CMake Error at cmake/FindGEOS.cmake:60 (MESSAGE):
  Could not determine GEOS version from framework.
Call Stack (most recent call first):
  CMakeLists.txt:148 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
bart150-115:Quantum-GIS varoudis$ 
#########



In Ubuntu cmake is OK but the build near the end. SIP problem?

Ubuntu Linux 64
###############
[ 90%] Built target compile_python_files
Scanning dependencies of target python_module_qgis_analysis
[ 90%] Building CXX object python/CMakeFiles/python_module_qgis_analysis.dir/analysis/sipanalysispart0.cpp.o
[ 90%] Building CXX object python/CMakeFiles/python_module_qgis_analysis.dir/analysis/sipanalysispart1.cpp.o
[ 90%] Building CXX object python/CMakeFiles/python_module_qgis_analysis.dir/analysis/sipanalysispart2.cpp.o
[ 90%] Building CXX object python/CMakeFiles/python_module_qgis_analysis.dir/analysis/sipanalysispart3.cpp.o
Linking CXX shared library ../output/python/qgis/analysis.so
[ 90%] Built target python_module_qgis_analysis
[ 90%] Generating core/sipcorepart0.cpp, core/sipcorepart1.cpp, core/sipcorepart2.cpp, core/sipcorepart3.cpp

sip: Deprecation warning: /home/varoudis/Code/temp/Quantum-GIS/python/core/core.sip:1: %Module version number should be specified using the 'version' argument
sip: Unable to find file "QtCore/QtCoremod.sip"
make[2]: *** [python/core/sipcorepart0.cpp] Error 1
make[1]: *** [python/CMakeFiles/python_module_qgis_core.dir/all] Error 2
make: *** [all] Error 2
varoudis at ubuntu:~/Code/temp/Quantum-GIS$

varoudis at ubuntu:~/Code/temp/Quantum-GIS$ uname -a
Linux ubuntu 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

##############

Any ideas? Links to read? Maybe use an older ubuntu version?

Maybe I have taken a wrong turn somewhere and I keep doing the same mistake?

Thanks a lot!

Best,
Tasos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120816/1b255f59/attachment.html>


More information about the Qgis-developer mailing list