Undefined symbols when trying to use libgeos++-dev package in 22.04
I am currently getting errors when trying to compile some example programs using libgeos++-dev in Ubuntu 22.04. I recently upgraded from 21.10 and everything was working ok.
Error occurs on the link and is something like:
undefined reference to `geos::
I believe this is an issue with the GEOS_INLINE define. Which normally would be set in the package build and if it isn't set when using the library you get this error. Setting GEOS_INLINE though causes compile time errors since all the .inl files are not included in the libgeos++-dev. Also it looks like upstream removed the use of GEOS_INLINE but it hasn't been released yet.
I was about to post this as a bug but maybe I'm missing something that others would know about? I can reproduce this error using the cpp_read.cpp example in the libgeos GitHub repo. I am using the following command line to compile:
g++ -o test -std=c++11 -lgeos -D USE_UNSTABLE_
Any help would be appreciated, even if I should post this as a bug.
Thanks.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu geos Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Michael Downey for more information if necessary.