Ask Your Question

Problem compilation libcomm

asked 2018-03-20 15:29:45 -0600

flperez gravatar image

I'm trying to link like a shared library but I cannot do it. First, I linking with the command:

addlibrary(comm SHARED IMPORTED) setproperty(TARGET comm PROPERTY IMPORTED_LOCATION "/opt/jderobot/lib/")

But I received the following message:

/opt/jderobot/lib/ undefined reference to CameraUtils::getImageFromCameraProxy(IceInternal::Handle<jderobot::ImageData>)' /opt/jderobot/lib/ undefined reference toCameraUtils::negotiateDefaultFormat(IceInternal::ProxyHandle<iceproxy::jderobot::camera>, std::_cxx11::basicstring<char, std::char_traits<char="">, std::allocator<char> > const&)' collect2: error: ld returned 1 exit status CMakeFiles/camautoloc.dir/build.make:1429: recipe for target 'camautoloc' failed make[2]: * [camautoloc] Error 1 CMakeFiles/Makefile2:643: recipe for target 'CMakeFiles/camautoloc.dir/all' failed make[1]: [CMakeFiles/cam_autoloc.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: ** [all] Error 2

Second, I downloaded the repository and compiled it again but I received the same message. Thirst, I downloaded the docker image, compile again and the same, I downloaded the new repository but the same story.

Please I need help and I don't know what I have to do.The CMakeList is:

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-26 11:41:04 -0600

rnicklas gravatar image

I'm having a similar problem, trying to do in the CMakeLists.txt

... addexecutable( verySimpleCV simpleCV.cpp ${INTERFACESCPP_DIR})

targetlinklibraries(verySimpleCV ... ${comm_LIBRARIES} ... )

Results in:

... [100%] Linking CXX executable verySimpleCV ../../../devel/lib/ undefined reference to IceProxy::jderobot::ImageProvider::getImageData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)' ../../../devel/lib/ undefined reference toVTT for jderobot::LaserData' ../../../devel/lib/ undefined reference to CameraUtils::negotiateDefaultFormat(IceInternal::ProxyHandle<IceProxy::jderobot::Camera>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' ../../../devel/lib/ undefined reference totypeinfo for IceProxy::jderobot::ArDroneExtra' ../../../devel/lib/ undefined reference to `typeinfo for IceProxy::jderobot::Laser' ... ... collect2: error: ld returned 1 exit status src/examples/basiccomponent/CMakeFiles/verySimpleCV.dir/build.make:161: recipe for target 'src/examples/basiccomponent/verySimpleCV' failed make[2]: * [src/examples/basiccomponent/verySimpleCV] Error 1 CMakeFiles/Makefile2:7318: recipe for target 'src/examples/basiccomponent/CMakeFiles/verySimpleCV.dir/all' failed make[1]: [src/examples/basic_component/CMakeFiles/verySimpleCV.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: ** [all] Error 2

Using the located in /opt results in the same issue.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-03-20 15:29:45 -0600

Seen: 33 times

Last updated: Mar 20 '18