[geos-devel] using geos C Api
Rémi Cura
remi.cura at gmail.com
Fri Oct 10 08:59:35 PDT 2014
Hello,
trying to use Geos C Api in a Cpp program.
The Cpp programm uses CMake.
Apparently the easy way to incorporate GEOS is by copying the QGIS solution.
I copy the FindGEOS.cmake file
<https://raw.githubusercontent.com/qgis/QGIS/master/cmake/FindGEOS.cmake>
then ad the path to it in CMakeList.txt
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
then using the regular
FIND_PACKAGE(GEOS REQUIRED)
fills GEOS_LIBRARY and GEOS_INCLUDE_DIR.
Then I add GEOS LIBRARY has a target for link :
TARGET_LINK_LIBRARIES(simple_snapping.bin ${CERES_LIBRARIES}
${GEOS_LIBRARY})
After that I'm stuck,
If I try to use Geos function I get an error by
ld :
" geometry_function.cc:-1: error: undefined reference to
`geos::io::WKTReader::WKTReader()'"
Anybody has an idea of how to fix this?
Cheers,
Rémi-C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geos-devel/attachments/20141010/23d172aa/attachment.html>
More information about the geos-devel
mailing list