[QGIS-Developer] Error compiling qgsapplication.h

Jürgen E. Fischer jef at norbit.de
Tue Apr 10 05:21:18 PDT 2018


Hi Magdaleen,

On Tue, 10. Apr 2018 at 12:19:50 +0200, Magdaleen Ballot wrote:
> I am maintaining a c++ Radio Planning Plugin for QGis, QRap (www.QRap.org.za).
> 
> I am trying to compile in Ubuntu 18.04, using QGis  2.18 (the libqgis-dev
> version is 1:2.18.18+28bionic. The compiler I am using is GNU 7.3. The
> error messages are below.
> 
> I had the same problem under Ubuntu 16.04 using Qgis 2.14 and c++ 5.
> 
> The last version I could complie successfully was QGIS 2.8.

Builds fine on debian unstable with 2.18.18 for me:

apt-get install libfann-dev libpoco-dev libqwt5-qt4-dev libeigen3-dev
svn checkout http://svn.code.sf.net/p/qrap/code/ qrap
mkdir qrap/build/
cd qrap/build/
# apply attached minor patch
cmake -D CMAKE_MODULE_PATH=/usr/share/qgis cmake -D POSTGRES_LIBRARY=/usr/lib/x86_64-linux-gnu/libpq.so -D PQXX_LIBRARY=/usr/lib/x86_64-linux-gnu/libpqxx.so  ..
make && sudo make install


Jürgen

-- 
Jürgen E. Fischer           norBIT GmbH             Tel. +49-4931-918175-31
Dipl.-Inf. (FH)             Rheinstraße 13          Fax. +49-4931-918175-50
Software Engineer           D-26506 Norden             http://www.norbit.de
-------------- next part --------------
Index: Prediction/cSpectralLink.h
===================================================================
--- Prediction/cSpectralLink.h	(revision 320)
+++ Prediction/cSpectralLink.h	(working copy)
@@ -77,7 +77,7 @@
 	double			mPlotResolution;///< Hz
 	short int		mDEMsource;		///< Description
 	short int		mClutterSource;	///< Description
-//	unsigned 		mClutterClassGroup;
+	unsigned 		mClutterClassGroup;
 //	cClutter		mClutterset;
 	cRasterFileHandler 	*mDEM;		///< Description
 	bool			mUseClutter;	///< Description
Index: cmake/FindQGIS.cmake
===================================================================
--- cmake/FindQGIS.cmake	(revision 320)
+++ cmake/FindQGIS.cmake	(nonexistent)
@@ -1,102 +0,0 @@
-## Once run this will define:
-##
-## QGIS_FOUND       = system has QGIS lib
-##
-## QGIS_CORE_LIBRARY     = full path to the CORE library
-## QGIS_GUI_LIBRARY      = full path to the GUI library
-## QGIS_PLUGIN_DIR       = full path to where QGIS plugins are installed
-## QGIS_INCLUDE_DIR      = where to find headers
-##
-## Tim Sutton
-
-#MESSAGE("Searching for QGIS")
-IF(WIN32)
-  #MESSAGE("Searching for QGIS in C:/program files/Quantum GIS")
-  IF (MINGW)
-    FIND_PATH(QGIS_PLUGIN_DIR libnortharrowplugin.dll
-         "C:/Program Files/Quantum GIS/plugins"
-        )
-    FIND_PATH(QGIS_INCLUDE_DIR qgsapplication.h
-         "C:/Program Files/Quantum GIS/include"
-         )
-    FIND_LIBRARY(QGIS_CORE_LIBRARY NAMES qgis_core PATHS
-         "C:/Program Files/Quantum GIS/"
-        )
-    FIND_LIBRARY(QGIS_GUI_LIBRARY NAMES qgis_gui PATHS
-        "C:/Program Files/Quantum GIS/"
-        )
-  ENDIF (MINGW)
-
-  IF (MSVC)
-    FIND_PATH(QGIS_PLUGIN_DIR libnortharrowplugin.dll
-         "C:/Program Files/Quantum GIS/lib/qgis"
-         )
-    FIND_PATH(QGIS_INCLUDE_DIR qgsapplication.h
-         "$ENV{LIB_DIR}/include/qgis"
-         )
-    FIND_LIBRARY(QGIS_CORE_LIBRARY NAMES qgis_core PATHS
-         "$ENV{LIB_DIR}/lib/"
-         )
-    FIND_LIBRARY(QGIS_GUI_LIBRARY NAMES qgis_gui PATHS
-         "$ENV{LIB_DIR}/lib/"
-         )
-  ENDIF (MSVC)
-
-ELSE(WIN32)
-  IF(UNIX)
-
-    # try to use bundle on mac
-    IF (APPLE)
-      #MESSAGE("Searching for QGIS in /Applications/QGIS.app/Contents/MacOS")
-      SET (QGIS_MAC_PATH /Applications/QGIS1.4.02.app/Contents/MacOS)
-      SET (QGIS_LIB_DIR ${QGIS_MAC_PATH}/lib)
-      SET (QGIS_PLUGIN_DIR ${QGIS_MAC_PATH}/lib/qgis/plugins CACHE STRING INTERNAL)
-      # set INCLUDE_DIR to prefix+include
-      SET(QGIS_INCLUDE_DIR ${QGIS_MAC_PATH}/include/qgis CACHE STRING INTERNAL)
-      ## extract link dirs
-      SET(QGIS_CORE_LIBRARY ${QGIS_LIB_DIR}/libqgis_core.dylib CACHE STRING INTERNAL)
-      SET(QGIS_GUI_LIBRARY ${QGIS_LIB_DIR}/libqgis_gui.dylib CACHE STRING INTERNAL)
-    ELSE (APPLE)
-      #MESSAGE("Searching for QGIS in /usr/bin; /usr/local/bin")
-      FIND_PATH(QGIS_PLUGIN_DIR libspitplugin.so
-	/usr/lib/qgis/plugins/
-        /usr/lib/
-        /usr/lib/qgis/
-#	/usr/local/lib/qgis/
-        )
-      FIND_PATH(QGIS_INCLUDE_DIR qgis.h
-        /usr/include/qgis/
-#	/usr/local/include/qgis/
-        )
-      FIND_LIBRARY(QGIS_CORE_LIBRARY NAMES qgis_core PATHS
-        /usr/lib/
-	/usr/lib/qgis/
-#	/usr/local/lib/
-        )
-      FIND_LIBRARY(QGIS_GUI_LIBRARY NAMES qgis_gui PATHS
-        /usr/lib/
-	/usr/lib/qgis/
-#	/usr/local/lib/
-        )
-    ENDIF (APPLE)
-  ENDIF(UNIX)
-ENDIF(WIN32)
-
-
-IF (QGIS_INCLUDE_DIR AND QGIS_CORE_LIBRARY AND QGIS_GUI_LIBRARY)
-  SET(QGIS_FOUND TRUE)
-ENDIF (QGIS_INCLUDE_DIR AND QGIS_CORE_LIBRARY AND QGIS_GUI_LIBRARY)
-
-IF (QGIS_FOUND)
-  IF (NOT QGIS_FIND_QUIETLY)
-    MESSAGE(STATUS "Found QGIS Core: ${QGIS_CORE_LIBRARY}")
-    MESSAGE(STATUS "Found QGIS Gui: ${QGIS_GUI_LIBRARY}")
-    MESSAGE(STATUS "Found QGIS Plugins Dir: ${QGIS_PLUGIN_DIR}")
-  ENDIF (NOT QGIS_FIND_QUIETLY)
-ELSE (QGIS_FOUND)
-  IF (QGIS_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find QGIS")
-  ENDIF (QGIS_FIND_REQUIRED)
-ENDIF (QGIS_FOUND)
-
-
Index: qrap.h
===================================================================
--- qrap.h	(revision 320)
+++ qrap.h	(working copy)
@@ -86,7 +86,7 @@
 #include "Prediction/cSpectralPlot.h"
 #include "Prediction/cPlotTask.h"
 #include "Prediction/cLink.h"
-#include <cMouseEvents.h>
+#include "cMouseEvents.h"
 #include "Interface/cPlaceSite.h"
 #include "Interface/cDeleteObject.h"
 #include "Interface/cConfirmLink.h"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180410/d6ee6cdc/attachment.sig>


More information about the QGIS-Developer mailing list