Menu

RANDOMLIB_SHARED_LIB must be 0 or 1

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

#error :  RANDOMLIB_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.9 version of RandomLib. The
fix is to remove all earlier cmake configuration files with (as root):

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

Beginning with version 1.9, 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.