Reputation: 11
I've been porting this code to work with opencv3. https://github.com/anhttran/extreme_3d_faces
So far I have made it through most of the compilation but I keep getting this error when its almost complete. I have looked at a number of occurances of this issue but none of the solutions have worked for me as yet. Any help would be greatly appreciated.
So far I've tried:
Result:
[ 92%] Linking CXX executable ../bin/TestBump /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib/libhdf5.a(H5PL.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status config/CMakeFiles/TestBump.dir/build.make:149: recipe for target 'bin/TestBump'
failed make[2]: *** [bin/TestBump] Error 1 CMakeFiles/Makefile2:196: recipe for target 'config/CMakeFiles/TestBump.dir/all'
failed make[1]: *** [config/CMakeFiles/TestBump.dir/all] Error 2
Makefile:129: recipe for target 'all' failed make: *** [all] Error 2
So far nothing has worked. any advice?
The code in my cmakelists file is as follows.
# Local libraries
include_directories(../modules/CvGl)
include_directories(../modules/PoseExpr/include)
include_directories(${DLIB_INCLUDE_DIR})
include_directories(${HDF5_INCLUDE_DIR})
add_definitions(-std=c++11)
add_definitions(-DDLIB_JPEG_SUPPORT)
add_definitions(-DDLIB_PNG_SUPPORT)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/")
set(CMAKE_BUILD_TYPE Release)
SET(SOURCE
../main.cpp
)
SET(CMAKE_CXX_FLAGS "-w -fopenmp")
add_executable(TestBump ${SOURCE})
if(WIN32)
target_link_libraries(TestBump ${OpenCVLibraries})
endif(WIN32)
if(UNIX)
target_link_libraries(TestBump -ldl ${OpenCV_LIBS}
${Boost_LIBRARIES} ${CMAKE_DL_LIBS})
endif(UNIX)
target_link_libraries(TestBump PoseExprLib
${DLIB_LIB_DIR}/libdlib.so ${CMAKE_DL_LIBS} -lGLU -lOSMesa -lm)
install (TARGETS TestBump DESTINATION .)
Upvotes: 1
Views: 4177