shaochuan / cmake-protobuf-example Goto Github PK
View Code? Open in Web Editor NEWMinimal example of using CMake to manage C++ project with protobuf.
License: MIT License
Minimal example of using CMake to manage C++ project with protobuf.
License: MIT License
Thank you for creating example how to build protobuf via cmake, I have a problem when running the compiled file.
libprotobuf FATAL google/protobuf/generated_message_util.cc:783
Solution
Open CMakeLists.txt in the main folder, change
TARGET_LINK_LIBRARIES(main proto ${PROTOBUF_LIBRARY})
into
TARGET_LINK_LIBRARIES(main proto ${PROTOBUF_LIBRARIES})
Based CMake documentation
https://cmake.org/cmake/help/v3.0/module/FindProtobuf.html
Hi, I open the project with Clion and I obtain this error :
/usr/bin/cmake --build /tmp/cmake-protobuf-example/cmake-build-debug --target main -- -j 4
[ 60%] Built target proto
Scanning dependencies of target main
[ 80%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[100%] Linking CXX executable main
proto/libproto.a(message.pb.cc.o): In functionmessage::protobuf_message_2eproto::(anonymous namespace)::protobuf_AssignDescriptors()': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:70: undefined reference to
google::protobuf::internal::AssignDescriptors(std::__cxx11::basic_string<char, std::char_traits, std::allocator > 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**)'
proto/libproto.a(message.pb.cc.o): In functionmessage::protobuf_message_2eproto::(anonymous namespace)::protobuf_RegisterTypes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:83: undefined reference to
google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata const*, int)'
proto/libproto.a(message.pb.cc.o): In functionmessage::protobuf_message_2eproto::TableStruct::InitDefaultsImpl()': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:94: undefined reference to
google::protobuf::internal::VerifyVersion(int, int, char const*)'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:96: undefined reference togoogle::protobuf::internal::InitProtobufDefaults()' proto/libproto.a(message.pb.cc.o): In function
message::protobuf_message_2eproto::AddDescriptorsImpl()':
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:110: undefined reference togoogle::protobuf::DescriptorPool::InternalAddGeneratedFile(void const*, int)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:112: undefined reference to
google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void ()(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&))'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:114: undefined reference togoogle::protobuf::internal::OnShutdown(void (*)())' proto/libproto.a(message.pb.cc.o): In function
std::pair<unsigned int, bool> google::protobuf::io::CodedInputStream::ReadTagWithCutoffImplementation(unsigned int)':
/usr/include/google/protobuf/io/coded_stream.h:1104: undefined reference togoogle::protobuf::io::CodedInputStream::ReadTagFallback(unsigned int)' proto/libproto.a(message.pb.cc.o): In function
message::Message::MergePartialFromCodedStream(google::protobuf::io::CodedInputStream)':
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:232: undefined reference togoogle::protobuf::internal::WireFormat::SkipField(google::protobuf::io::CodedInputStream*, unsigned int, google::protobuf::UnknownFieldSet*)' proto/libproto.a(message.pb.cc.o): In function
message::Message::SerializeWithCachedSizes(google::protobuf::io::CodedOutputStream*) const':
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:255: undefined reference togoogle::protobuf::internal::WireFormatLite::WriteInt32(int, int, google::protobuf::io::CodedOutputStream*)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:260: undefined reference to
google::protobuf::internal::WireFormat::SerializeUnknownFields(google::protobuf::UnknownFieldSet const&, google::protobuf::io::CodedOutputStream*)'
proto/libproto.a(message.pb.cc.o): In functionmessage::Message::InternalSerializeWithCachedSizesToArray(bool, unsigned char*) const': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:278: undefined reference to
google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&, unsigned char*)'
proto/libproto.a(message.pb.cc.o): In functionmessage::Message::ByteSizeLong() const': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:291: undefined reference to
google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(google::protobuf::UnknownFieldSet const&)'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:297: undefined reference togoogle::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::RepeatedField<int> const&)' proto/libproto.a(message.pb.cc.o): In function
message::Message::MergeFrom(google::protobuf::Message const&)':
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:312: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:312: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:312: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:312: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:318: undefined reference togoogle::protobuf::internal::ReflectionOps::Merge(google::protobuf::Message const&, google::protobuf::Message*)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:312: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
proto/libproto.a(message.pb.cc.o): In functionmessage::Message::MergeFrom(message::Message const&)': /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:327: undefined reference to
google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:327: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:327: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:327: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' /tmp/cmake-protobuf-example/cmake-build-debug/proto/message.pb.cc:327: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::Closure::Closure()': /usr/include/google/protobuf/stubs/callback.h:72: undefined reference to
vtable for google::protobuf::Closure'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::internal::FunctionClosure0::FunctionClosure0(void (*)(), bool)': /usr/include/google/protobuf/stubs/callback.h:124: undefined reference to
vtable for google::protobuf::internal::FunctionClosure0'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::io::CodedInputStream::ReadVarint32(unsigned int*)': /usr/include/google/protobuf/io/coded_stream.h:929: undefined reference to
google::protobuf::io::CodedInputStream::ReadVarint32Fallback(unsigned int)'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::io::CodedInputStream::ReadVarintSizeAsInt(int*)': /usr/include/google/protobuf/io/coded_stream.h:954: undefined reference to
google::protobuf::io::CodedInputStream::ReadVarintSizeAsIntFallback()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::GoogleOnceInit(long*, void (*)())': /usr/include/google/protobuf/stubs/once.h:128: undefined reference to
google::protobuf::GoogleOnceInitImpl(long*, google::protobuf::Closure*)'
/usr/include/google/protobuf/stubs/once.h:127: undefined reference togoogle::protobuf::internal::FunctionClosure0::~FunctionClosure0()' /usr/include/google/protobuf/stubs/once.h:127: undefined reference to
google::protobuf::internal::FunctionClosure0::~FunctionClosure0()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::MessageLite::MessageLite()': /usr/include/google/protobuf/message_lite.h:86: undefined reference to
vtable for google::protobuf::MessageLite'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::MessageLite::~MessageLite()': /usr/include/google/protobuf/message_lite.h:87: undefined reference to
vtable for google::protobuf::MessageLite'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::UnknownFieldSet::Clear()': /usr/include/google/protobuf/unknown_field_set.h:267: undefined reference to
google::protobuf::UnknownFieldSet::ClearFallback()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::internal::InternalMetadataWithArena::DoMergeFrom(google::protobuf::UnknownFieldSet const&)': /usr/include/google/protobuf/metadata.h:62: undefined reference to
google::protobuf::UnknownFieldSet::MergeFrom(google::protobuf::UnknownFieldSet const&)'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::internal::InternalMetadataWithArena::default_instance()': /usr/include/google/protobuf/metadata.h:70: undefined reference to
google::protobuf::UnknownFieldSet::default_instance()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::Message::Message()': /usr/include/google/protobuf/message.h:188: undefined reference to
vtable for google::protobuf::Message'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::Message::~Message()': /usr/include/google/protobuf/message.h:189: undefined reference to
vtable for google::protobuf::Message'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::RepeatedField<int>::Get(int) const': /usr/include/google/protobuf/repeated_field.h:1141: undefined reference to
google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/usr/include/google/protobuf/repeated_field.h:1141: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /usr/include/google/protobuf/repeated_field.h:1141: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/usr/include/google/protobuf/repeated_field.h:1141: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' /usr/include/google/protobuf/repeated_field.h:1142: undefined reference to
google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)'
/usr/include/google/protobuf/repeated_field.h:1142: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /usr/include/google/protobuf/repeated_field.h:1142: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/usr/include/google/protobuf/repeated_field.h:1142: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' /usr/include/google/protobuf/repeated_field.h:1141: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1142: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
void google::protobuf::Arena::OwnInternalmessage::Message(message::Message*, google::protobuf::internal::integral_constant<bool, true>)':
/usr/include/google/protobuf/arena.h:853: undefined reference togoogle::protobuf::Arena::AddListNode(void*, void (*)(void*))' proto/libproto.a(message.pb.cc.o): In function
message::Message const* google::protobuf::internal::DynamicCastToGenerated<message::Message const>(google::protobuf::Message const*)':
/usr/include/google/protobuf/generated_message_reflection.h:696: undefined reference totypeinfo for google::protobuf::Message' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::MergeFrom(google::protobuf::RepeatedField const&)':
/usr/include/google/protobuf/repeated_field.h:1206: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1206: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/repeated_field.h:1206: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /usr/include/google/protobuf/repeated_field.h:1206: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1206: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::InternalSwap(google::protobuf::RepeatedField)':
/usr/include/google/protobuf/repeated_field.h:1256: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1256: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const)'
/usr/include/google/protobuf/repeated_field.h:1256: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /usr/include/google/protobuf/repeated_field.h:1256: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1257: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1257: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/repeated_field.h:1257: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /usr/include/google/protobuf/repeated_field.h:1257: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1256: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' /usr/include/google/protobuf/repeated_field.h:1257: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
proto/libproto.a(message.pb.cc.o): In functiongoogle::protobuf::internal::InternalMetadataWithArenaBase<google::protobuf::UnknownFieldSet, google::protobuf::internal::InternalMetadataWithArena>::Container* google::protobuf::Arena::CreateInternal<google::protobuf::internal::InternalMetadataWithArenaBase<google::protobuf::UnknownFieldSet, google::protobuf::internal::InternalMetadataWithArena>::Container>(bool)': /usr/include/google/protobuf/arena.h:671: undefined reference to
google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
/usr/include/google/protobuf/arena.h:673: undefined reference togoogle::protobuf::Arena::AddListNode(void*, void (*)(void*))' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::Reserve(int)':
/usr/include/google/protobuf/repeated_field.h:1334: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1334: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/repeated_field.h:1334: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /usr/include/google/protobuf/repeated_field.h:1334: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/usr/include/google/protobuf/repeated_field.h:1334: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
char* google::protobuf::Arena::CreateArray(google::protobuf::Arena*, unsigned long)':
/usr/include/google/protobuf/arena.h:453: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/arena.h:453: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/arena.h:453: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /usr/include/google/protobuf/arena.h:453: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/usr/include/google/protobuf/arena.h:453: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
char* google::protobuf::Arena::CreateInternalRawArray(unsigned long)':
/usr/include/google/protobuf/arena.h:651: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/arena.h:651: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/arena.h:651: undefined reference togoogle::protobuf::internal::LogMessage::operator<<(char const*)' /usr/include/google/protobuf/arena.h:651: undefined reference to
google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)'
/usr/include/google/protobuf/arena.h:651: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' /usr/include/google/protobuf/arena.h:655: undefined reference to
google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
/usr/include/google/protobuf/arena.h:651: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
char* google::protobuf::Arena::CreateArray(google::protobuf::Arena*, unsigned long)':
/usr/include/google/protobuf/arena.h:453: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::Reserve(int)':
/usr/include/google/protobuf/repeated_field.h:1334: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::AddAlreadyReserved(int const&)':
/usr/include/google/protobuf/repeated_field.h:1110: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1110: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/repeated_field.h:1110: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /usr/include/google/protobuf/repeated_field.h:1110: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1110: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
google::protobuf::RepeatedField::unsafe_data() const':
/usr/include/google/protobuf/repeated_field.h:1250: undefined reference togoogle::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel, char const*, int)' /usr/include/google/protobuf/repeated_field.h:1250: undefined reference to
google::protobuf::internal::LogMessage::operator<<(char const*)'
/usr/include/google/protobuf/repeated_field.h:1250: undefined reference togoogle::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage&)' /usr/include/google/protobuf/repeated_field.h:1250: undefined reference to
google::protobuf::internal::LogMessage::~LogMessage()'
/usr/include/google/protobuf/repeated_field.h:1250: undefined reference togoogle::protobuf::internal::LogMessage::~LogMessage()' proto/libproto.a(message.pb.cc.o): In function
bool google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<int, (google::protobuf::internal::WireFormatLite::FieldType)5>(google::protobuf::io::CodedInputStream*, google::protobuf::RepeatedField*)':
/usr/include/google/protobuf/wire_format_lite_inl.h:331: undefined reference togoogle::protobuf::io::CodedInputStream::PushLimit(int)' /usr/include/google/protobuf/wire_format_lite_inl.h:332: undefined reference to
google::protobuf::io::CodedInputStream::BytesUntilLimit() const'
/usr/include/google/protobuf/wire_format_lite_inl.h:337: undefined reference togoogle::protobuf::io::CodedInputStream::PopLimit(int)' proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0x20): undefined reference to
google::protobuf::Message::GetTypeNameabi:cxx11 const'
proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0x58): undefined reference togoogle::protobuf::Message::InitializationErrorString[abi:cxx11]() const' proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0x60): undefined reference to
google::protobuf::Message::CheckTypeAndMergeFrom(google::protobuf::MessageLite const&)'
proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0x80): undefined reference togoogle::protobuf::MessageLite::SerializeWithCachedSizesToArray(unsigned char*) const' proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0xa8): undefined reference to
google::protobuf::Message::DiscardUnknownFields()'
proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTVN7message7MessageE[_ZTVN7message7MessageE]+0xb0): undefined reference togoogle::protobuf::Message::SpaceUsedLong() const' proto/libproto.a(message.pb.cc.o):(.data.rel.ro._ZTIN7message7MessageE[_ZTIN7message7MessageE]+0x10): undefined reference to
typeinfo for google::protobuf::Message'
collect2: error: ld returned 1 exit status
make[3]: *** [CMakeFiles/main.dir/build.make:96: main] Error 1
make[2]: *** [CMakeFiles/Makefile2:68: CMakeFiles/main.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/main.dir/rule] Error 2
make: *** [Makefile:118: main] Error 2
I have the same error when I run it manually in cli.
My protobuf version : 3.3.2
When I use the example unchanged I get unresolved externals to protobuf lib since the variable in the root script is not set.
I propose to move the FindLibrary to protobuf into the root CMakeList.txt since the variables in leafs go out of scope when returning to the root.
Here is a diff to make it work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.