I'm trying to add libconfig++
to my CMake project, but it still complains
Libconfig library is config++
...
CMakeFiles/CustomCamReaderTask.dir/acA2440-20gc_ConfigUtility.cc.o: undefined reference to symbol '_ZN13ConfigSection3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERl'
.../lib/libconfig.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Here is my CMakeLists.txt
find_package(PkgConfig)
pkg_check_modules(LIBCONFIG_PLUSPLUS libconfig++ REQUIRED)
add_executable(CustomCamReaderTask
CustomCamReaderTask.cc
acA2440-20gc_ConfigUtility.cc)
target_include_directories(CustomCamReaderTask
PRIVATE ${CMAKE_SOURCE_DIR}/src/include/Pylon5
/opt/pylon5/include)
message("Libconfig library is ${LIBCONFIG_PLUSPLUS_LIBRARIES}")
target_link_libraries(CustomCamReaderTask
${LIBCONFIG_PLUSPLUS_LIBRARIES}
${PYLON_LIBS}
task
imageUtility
${OPENCV_LIBRARIES})
link_directories(/opt/pylon5/lib64)
link_libraries(${LIBCONFIG_PLUSPLUS_LIBRARIES})
It seems to find config++, I linked the directory, linked the library, not sure what else is wrong..