<div dir="ltr"><div><div><div>Hello,<br></div>trying to use Geos C Api in a  Cpp program.<br></div><div>The Cpp programm uses CMake.<br><br></div><div>Apparently the easy way to incorporate GEOS is by copying the QGIS solution.<br></div><div>I copy the <a href="https://raw.githubusercontent.com/qgis/QGIS/master/cmake/FindGEOS.cmake">FindGEOS.cmake file</a><br></div><div>then ad the path to it in CMakeList.txt<br>    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")<br>    <br></div><div>then using the regular <br>  FIND_PACKAGE(GEOS REQUIRED)<br></div><div>fills GEOS_LIBRARY and GEOS_INCLUDE_DIR.<br><br></div><div>Then I add GEOS LIBRARY has a target for link :<br>TARGET_LINK_LIBRARIES(simple_snapping.bin ${CERES_LIBRARIES} ${GEOS_LIBRARY})<br><br><br></div><div>After that I'm stuck, <br></div><div>If I try to use Geos function I get an error by <br>ld :<br>" geometry_function.cc:-1: error: undefined reference to `geos::io::WKTReader::WKTReader()'"<br></div><br></div>Anybody has an idea of how to fix this?<br><br>Cheers,<br>Rémi-C<br><div><br></div></div>