BagFromImages icon indicating copy to clipboard operation
BagFromImages copied to clipboard

Unusual make error

Open sky-coder opened this issue 6 years ago • 5 comments

Hi, I got stumbled with the following unusual make error: Any insights would be appreciated!

[ 33%] Linking CXX executable ../bin/BagFromImages /usr/bin/ld: CMakeFiles/BagFromImages.dir/main.cc.o: undefined reference to symbol '_ZN14console_bridge3logEPKciNS_8LogLevelES1_z' /usr/lib/x86_64-linux-gnu/libconsole_bridge.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status CMakeFiles/BagFromImages.dir/build.make:219: recipe for target '../bin/BagFromImages' failed make[2]: *** [../bin/BagFromImages] Error 1 CMakeFiles/Makefile2:677: recipe for target 'CMakeFiles/BagFromImages.dir/all' failed make[1]: *** [CMakeFiles/BagFromImages.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

sky-coder avatar Jun 12 '18 11:06 sky-coder

it's a problem of lib linkage. According to the error msg, libconsole_bridge should be linked apparently in CMakeLists.txt. like:

target_link_libraries (${PROJECT_NAME}
console_bridge)

Hope it will help you.

panecho avatar Jul 12 '18 01:07 panecho

Thanks! @ZhengPan2014

mojovski avatar Nov 20 '18 23:11 mojovski

Thanks!!!! @ZhengPan2014

LiShuaixin avatar Nov 11 '20 10:11 LiShuaixin

Thanks!!!! @ZhengPan2014

wanjh1024 avatar Mar 08 '21 04:03 wanjh1024

I went ahead and added the following code to build successfully target_link_libraries (${PROJECT_NAME} console_bridge boost_system boost_filesystem)

X-NEARS avatar Nov 11 '22 09:11 X-NEARS