I'm trying to build a project with the library libconfig - not linked. Errors of the form:
/var/deadBranch/nginx-instaban/main.cpp:27: undefined reference to `libconfig::Config::Config()' /var/deadBranch/nginx-instaban/main.cpp:33: undefined reference to `libconfig::Config::readFile(char const*)' CmakeLists.txt:
cmake_minimum_required(VERSION 3.5) project(nginx-instaban) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -lconfig++ -lconfig") set(SOURCE_FILES main.cpp strFuncs.h banMgr.h banMgr.cpp banMgr.h nginxConfigReader.cpp nginxConfigReader.h IpParser.h IpHashTableGeneric.cpp IpHashTableGeneric.h BanRecord.h IpParser.cpp BinaryOps.h CheckIpHashTable.cpp CheckIpHashTable.h Configuration.cpp Configuration.h) add_executable(nginx-instaban ${SOURCE_FILES}) Installed libconfig ++ - dev and libconfig ++ 8-dev for some reason.
*-devpackages are object and header files needed to build programs that use the library from the corresponding non-*-devpackage. - ߊߚߤߘ