I’m running CLion on OSX 12.7.5. I have the libjsoncpp.a file under /usr/local/lib. In my root CMakeLists.txt file I have the following:
find_library(jsoncpp NAMES libjsoncpp.a PATHS /usr/local/lib)
which results in a build error of the following
ld: library not found for -ljsoncpp
Shouldn’t the build command have libjsoncpp.a instead of -ljsoncpp?
Also, in linux there is ldconfig. Is there an equivalent on Mac to make sure the library is loaded correctly. I installed the lib from the https://github.com/open-source-parsers/jsoncpp.git repo.