Menu

GEOGRAPHICLIB_SHARED_LIB must be 0 or 1

After upgrading to GeographicLib version 1.34 or later, it's possible
that projects that compile and link to GeographicLib will get this
compiler error:

#error :  GEOGRAPHICLIB_SHARED_LIB must be 0 or 1

This will only happen on non-Windows systems and is caused by cmake
finding the cmake configuration for a pre-1.34 version of GeographicLib.
The fix is to remove all earlier cmake configuration files with (as
root):

rm -rf /usr/local/share/cmake/GeographicLib-1.*

Beginning with version 1.34, the directory name for the cmake
configuration files does not contain a version number; so this problem
will not recur.

Posted by Charles Karney 2014-03-15

Log in to post a comment.