robertknight / Qt-Inspector

Utility to browse the Qt object tree of a running Qt application and edit object properties on the fly.
GNU Lesser General Public License v3.0
401 stars 70 forks source link

undefined reference to protobuf libs #14

Open pnck opened 7 years ago

pnck commented 7 years ago

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 commented 7 years ago

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.