Linker Error in simple program in Groovy
Hello, everyone,
I'm having some trouble in the linking step of my program after running rosmake.
My program has a dependency in one other package, though I'm pretty sure that this console output isn't related to something on my end.
[ rosmake ] Last 40 linesmpSensorInterface: 10.4 sec ] [ 1 Active 21/22 Complete ]
{-------------------------------------------------------------------------------
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'virtual thunk to log4cxx::AppenderSkeleton::addRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'virtual thunk to log4cxx::helpers::ObjectImpl::~ObjectImpl()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Level::getInfo()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'typeinfo for log4cxx::AppenderSkeleton'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::helpers::ObjectImpl::addRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::helpers::Pool::~Pool()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'typeinfo for log4cxx::Appender'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Logger::getRootLogger()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Logger::getLogger(char const*)'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::AppenderSkeleton::addRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Logger::getLoggerRepository() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'typeinfo for log4cxx::helpers::ObjectImpl'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'VTT for log4cxx::Appender'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::helpers::Object::getClass() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::spi::OptionHandler::getStaticClass()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::AppenderSkeleton::releaseRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::spi::LocationInfo::getLineNumber() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Logger::getLogger(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Level::getDebug()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'vtable for log4cxx::helpers::Object'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Level::getWarn()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'virtual thunk to log4cxx::helpers::ObjectImpl::addRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::Appender::getClass() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::helpers::ObjectPtrBase::~ObjectPtrBase()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'virtual thunk to log4cxx::helpers::ObjectImpl::~ObjectImpl()'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'virtual thunk to log4cxx::helpers::ObjectImpl::releaseRef() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::spi::LocationInfo::getMethodName() const'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::AppenderSkeleton::doAppend(log4cxx::helpers::ObjectPtrT<log4cxx::spi::LoggingEvent> const&, log4cxx::helpers::Pool&)'
/opt/ros/groovy/lib/libroscpp.so: error: undefined reference to 'log4cxx::helpers::Object::getStaticClass()'
/opt ...
Ah, I should also post my additions to the CMakeLists.txt
19 rosbuild_add_executable(tempSensorInterface src/tempSensorInterface.cpp)
20 target_link_libraries( tempSensorInterface uniserial)
You can also edit your question to add additional information.
Did you build groovy from source or install the Ubuntu binary packages?
I'm using the binary packages. Should I remove ROS and reinstall from source? (At this point I've also now successfully installed the log4cxx library.)
The binary packages will be much easier to get working.