Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to protobuf libs #14

Open
pnck opened this issue Jul 21, 2017 · 1 comment
Open

undefined reference to protobuf libs #14

pnck opened this issue Jul 21, 2017 · 1 comment
Labels
question Further information needed

Comments

@pnck
Copy link

pnck commented Jul 21, 2017

Hello,
I'm getting these undefined references:

[ 96%] Building CXX object CMakeFiles/qtinspector.dir/qtinspector_automoc.cpp.o
[100%] Linking CXX executable qtinspector
CMakeFiles/qtinspector.dir/TargetApplicationProxy.cpp.o: In function `google::protobuf::internal::GetEmptyStringAlreadyInited[abi:cxx11]()':
TargetApplicationProxy.cpp:(.text._ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev[_ZN6google8protobuf8internal27GetEmptyStringAlreadyInitedB5cxx11Ev]+0x7): undefined reference to `google::protobuf::internal::fixed_address_empty_string[abi:cxx11]'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::DecrementRecursionDepthAndPopLimit(int)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::WireFormatLite::VerifyUtf8String(char const*, int, google::protobuf::internal::WireFormatLite::Operation, char const*)'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::ReadVarint64Fallback()'
lib/libQtInspector.so: undefined reference to `google::protobuf::UnknownFieldSet::default_instance()'
lib/libQtInspector.so: undefined reference to `google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::IncrementRecursionDepthAndPushLimit(int)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::InitProtobufDefaults()'
lib/libQtInspector.so: undefined reference to `google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
lib/libQtInspector.so: undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntFallback()'
lib/libQtInspector.so: undefined reference to `google::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, google::protobuf::internal::MigrationSchema const*, google::protobuf::Message const* const*, unsigned int const*, google::protobuf::MessageFactory*, google::protobuf::Metadata*, google::protobuf::EnumDescriptor const**, google::protobuf::ServiceDescriptor const**)'
lib/libQtInspector.so: undefined reference to `google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int)'
collect2: error: ld returned 1 exit status
CMakeFiles/qtinspector.dir/build.make:413: recipe for target 'qtinspector' failed
make[2]: *** [qtinspector] Error 1
CMakeFiles/Makefile2:68: recipe for target 'CMakeFiles/qtinspector.dir/all' failed
make[1]: *** [CMakeFiles/qtinspector.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

buiding with protobuf 3.3.0, Ubuntu 16.04
did i miss something?

@robertknight
Copy link
Owner

It looks to me like libQtInspector.so is not being linked with the appropriate protobuf libraries, or there is a mismatch between the header and that library that is being linked to.

I haven't tried building this recently. Please post an update if you figure out what is happening.

@robertknight robertknight added the question Further information needed label Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information needed
Projects
None yet
Development

No branches or pull requests

2 participants