Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.

Protobuf dependency in ROS Fuerte/MacOSX

I am trying to compile my ROS node. This node compiles perfectly fine in Unix (running ROS Electric). Now, I am trying to compile it in Mac (running ROS Fuerte). The node depends on Google Protobuf, and I have installed protobuf successfully and also compiled my .proto file successfully. However, when I try to make my ROS node, I get some errors:

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o

The list of errors continues for quite some time... it's doubtful that this helps, but here is the full list of errors...

Linking CXX executable bin/mylib Undefined symbols for architecture x86_64: "_main", referenced from: start in crt1.10.6.o "google::protobuf::DescriptorPool::generated_pool()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::FindFileByName(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&) const", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::operator<<(char const)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::internal::LogMessage::~LogMessage()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::MessageFactory::generated_factory()", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::GeneratedMessageReflection::GeneratedMessageReflection(google::protobuf::Descriptor const, google::protobuf::Message const, int const, int, int, int, google::protobuf::DescriptorPool const, google::protobuf::MessageFactory, int)", referenced from: protobuf::protobuf_AssignDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::MergeFrom(protobuf::CommandObj const&)in maverick_cmd.pb.o "typeinfo for google::protobuf::Message", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o typeinfo for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message)", referenced from: protobuf::CommandObj::MergeFrom(google::protobuf::Message const&)in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)", referenced from: protobuf::CommandObj::ByteSize() constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned long long, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::VerifyUTF8StringFallback(char const, int, google::protobuf::internal::WireFormat::Operation)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedOutputStream::WriteRawToArray(void const, int, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char)", referenced from: protobuf::CommandObj::SerializeWithCachedSizesToArray(unsigned char) constin maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteString(int, std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteFloat(int, float, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::WriteDouble(int, double, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream)", referenced from: protobuf::CommandObj::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream) const in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream, std::basic_string<char, std::char_traits<char="">, std::allocator<char> >)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian32Fallback(unsigned int)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadLittleEndian64Fallback(unsigned long long)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream, unsigned int, google::protobuf::UnknownFieldSet)", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::io::CodedInputStream::ReadTagFallback()", referenced from: protobuf::CommandObj::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream) in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::ClearFallback()", referenced from: protobuf::CommandObj::Clear() in maverick_cmd.pb.o "google::protobuf::UnknownFieldSet::~UnknownFieldSet()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o "google::protobuf::Message::~Message()", referenced from: protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::~CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o ... "google::protobuf::UnknownFieldSet::UnknownFieldSet()", referenced from: protobuf::CommandObj::New() constin maverick_cmd.pb.o protobuf::CommandObj::CommandObj(protobuf::CommandObj const&)in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::CommandObj::CommandObj()in maverick_cmd.pb.o protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::VerifyVersion(int, int, char const)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const, int)", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const, void ()(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&))", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::internal::OnShutdown(void ()())", referenced from: protobuf::protobuf_AddDesc_maverick_5fcmd_2eproto() in maverick_cmd.pb.o "google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(google::protobuf::Descriptor const, google::protobuf::Message const)", referenced from: protobuf::(anonymous namespace)::protobuf_RegisterTypes(std::basic_string<char, std::char_traits<char="">, std::allocator<char> > const&)in maverick_cmd.pb.o "google::protobuf::Message::GetTypeName() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::InitializationErrorString() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::DiscardUnknownFields()", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o "google::protobuf::Message::SpaceUsed() const", referenced from: vtable for protobuf::CommandObjin maverick_cmd.pb.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: [bin/mylib] Error 1 make[1]: [CMakeFiles/mylib.dir/all] Error 2 make: ** [all] Error 2

I'm thinking that the errors have something to do with the protobuf dependency. Also, I have a file in my node ./libs/libmylib.so, and I don't actually know what the purpose of this file is, but it is referenced in my CMakeLists.txt file...

rosbuild_add_library(mylib src/maverick_cmd.pb.cc)

Thanks for the help.