Doug Lewis | 27 Jun 20:00 2016
Picon

Cannot Build proto3 C++ Source Using gcc

I'm trying to build the proto3 C++ source using gcc.  I've tried both command line and using Eclipse.  I get the same error either way I attempt to build:

/bin/sh ../libtool  --tag=CXX   --mode=link g++  -DHAVE_PTHREAD=1  -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG   -o protoc.exe google/protobuf/compiler/main.o  libprotobuf.la libprotoc.la 
libtool: link: g++ -DHAVE_PTHREAD=1 -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -O2 -g -DNDEBUG -o .libs/protoc.exe google/protobuf/compiler/main.o  ./.libs/libprotobuf.dll.a ./.libs/libprotoc.dll.a C:\cygwin/home/DLewis/RTS3-PB-Clean/protobuf-3.0.0-beta-3/src/.libs/libprotobuf.dll.a -L/usr/local/lib
g++.exe: C:cygwin/home/DLewis/RTS3-PB-Clean/protobuf-3.0.0-beta-3/src/.libs/libprotobuf.dll.a: No such file or directory

I have checked and the file libprotobuff.dll.a is in the directory/folder.

Thanks,
Doug

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Zellyn | 24 Jun 17:35 2016
Picon
Gravatar

Question about Go protobufs and import_prefix

Hi folks,

Apologies in advance for the complex email. It takes a bit of explaining to set up what we're having trouble with.

I would like to lay out how we generate protos in Go (using our unfortunately forked version of the protoc plugin), and ask for suggestions as to how to accomplish the same thing with the unforked version. In the process, I wish to ask questions about the post-vendor-experiment utility of the current behavior of import_prefix, hopefully generating more discussion than I managed to here.

Background:
  • We have protos spread around all over the place: in our Go monorepo, in our Java monorepo, and in miscellaneous Ruby repos.
  • We collect them all into a single directory before generating Go code. Call it $COLLECT_DIR
  • We have to use go_package to reorganize things that are fine in Java/Ruby, but would be circular package imports in Go.
  • For historical reasons, our Go repo is checked out to $GOPATH/src/square/up. I know it's a little weird, but it's logically equivalent to any other location. Pretend "square/up" is "square3" if you like… :-)
  • Our monorepo's vendor folder lives at $GOPATH/src/square/up/vendor/...
  • We want to generate protos into $GOPATH/src/square/up/protos to keep them all in one place.
  • Most of our protos are in package "squareup.*", but we have some third-party protos that have their own packages. Or none (eg. nanopb).
  • Right now we also have copies of WKT protos in $COLLECT_DIR, but I'd love to just import them from their vendor folder locations.
What we do now: full go_package including "protos" folder in protobufs

Add full package and path go_package to every protobuf:
eg. For a file with package "squareup.testing", we set option go_package = "square/up/squareup/protos/testing".
(We haven't actually added these declarations everywhere yet: this is what our forked plugin does: if go_package doesn't specify package path, we use square/up/protos + slash-separated-package. But it's about the same thing. Our fork was created long before go_package gained the ability to actually specify output package path)

Cons:
  • We generate into the output directory of $GOPATH/src, which is terrible: we could accidentally generate stuff into any arbitrary go package in our GOPATH. :-(
  • We're writing an implementation detail (where we currently store protos) into all the proto files
What I would like to do:

Generate into an output directory of $GOPATH/src/square/up/protos, and use the import_prefix option to ensure that things get imported from the right place.

Why that doesn't work:
  • import_prefix is added to *every* import, including grpc packages, the context package, the proto runtime package, etc. This made sense when the prefix was intended to be something like "square/up/Godep/_workspace/" (eg. vendoring by import-path-rewriting), but doesn't make sense anymore.
  • import_prefix is added to imports for ALL protos, including things like well-known-type protos that should just live under $GOPATH/src/square/up/vendor/github.com/golang/protobuf/proto
What I'd like to get out of this:
Either:
  • a reworking of the way import_prefix works
  • a new parameter with slightly different semantics: adds an import prefix only for protos, and only for protos in a particular list of folders:
    • eg. proto_import_prefix_by_dir=$COLLECT_DIR:square/up/protos
  • an explanation of how I'm Doing it Wrong - I'm happy to change things. While there's a lot of existing code, Go protos have caused me so much pain, I'm willing to invest pretty significant effort.
Why I'd like to defork

Our fork was created before go_package could rearrange output packages (commit). With the recent increase in grpc-related volatility of the protobuf package, it's increasingly painful to maintain our fork. And since grpc updates are often tied to proto updates, I can't simply avoid updating it. Plus all the usual reasons maintaining a fork is terrible :-)

Comments, suggestions, and help welcome.

Zellyn

cc dsymonds, matloob at Google, Josh at Square.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Doug Lewis | 22 Jun 21:41 2016
Picon

proto3 beta 3.1 Missing aclocal.m4 File?

I'm trying to build proto3 beta 3.1 using Cygwin.  The autogen.sh script errors out because it cannot find the aclocal file.  I see the aclocal.m4 file in the zip of the previous beta version but I do not see any aclocal file in the 3.1 zip.

Thanks,
Doug


--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Doug Lewis | 21 Jun 21:58 2016
Picon

Has Anyone Been Able to Build proto3 Using the GNU Tools on a Windows PC?

After much work by 2 engineers we were finally able to build proto3 using Visual Studio 2015 and are able to build Windows programs that use the protocol buffers, proto3.

Now for the meat of our project, we are planning on using the protocol buffers in an embedded environment that is running an ARM processor so we need to build the proto3 for a cross compile to the ARM.  I was never able to get proto3 to build using the GNU tools on my Windows PC, failed during the link process (could not find a .lib file in a directory).  I checked and the .lib file exists in the directory that the linker is expecting it to be in.

Thanks,
Doug

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Steve Beckert | 21 Jun 19:37 2016
Picon

prevent version mismatch between build and runtime

system
1 process, 2 components - Client and Server, written in cpp
Client and Server each use Model.proto but different versions

build
Server generates and builds its own .h and .cc proto files and compiles them into libServer.so
Client also generate and builds its own proto files and compiles them into libClientProto.so
The remaining Client functionality which uses proto is compiled into libClient.so
Client links to libServer.so and libClientProto.so

Even when the communication between Client and Server is with serialized proto, I am seeing crashes in libClient.so because it was built against Client's version of proto but runs against Server's version, since an implementation of the proto.h is supplied by both libClientProto.so and libServer.so
I realize the safest way would be for Client's USE of proto be in the same library as the compiled proto rather than rely on run-time linking.

How do I ensure the functionality in libClient.so, which was built against version 1 of Model.proto, runs against libClientProto.so rather than libServer.so which uses version 2 of Model.proto?
How can I best prevent some new component Client2 from making the same mistake?

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Vishnu Vardhanan A | 21 Jun 11:13 2016
Picon

exchanging images between application using protobuf2006000

Hello,

We are trying to send the images of size of approx. 2 MB using protobuf2006000. Since the image contents are data only, it cannot be managed with structures. We are currently some frame drops(data loss) issue while transmitting from one application other. Can somebody explain us why this is happening? and how to mitigate this?

Thanks and Regards,
Vishnu

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Steve Beckert | 21 Jun 15:54 2016
Picon

proto versioning - preventing linking at runtime to a proto version different than at buildtime


System
1 process with 2 components - a client and a server
Both Client and Server make use of a Model.proto
Client and Server are built with different versions of Model.proto

Build
Server generates .h and .cc files at buildtime and compiles them into libServer.so. Sever's use of the proto is contained solely within libServer.so
Client also generates .h and .cc files at buildtime and builds a library libClientProto.so. Client's use of the proto is in a different library libClient.so
libClient depends on both libServer and libClientProto

Runtime
How do I guarantee at runtime that libClient uses libClientProto to create proto classes instead of libServer, since both libClientProto and libServer supply the same proto symbols?
Even though Client and Server communicate with serialized proto objects, if Client was built with version 1 of Model.proto but Server was built with version 2, I see crashes when destructing proto classes due libClient using libServer for its proto.

I know a better approach would be to ensure the proto .cc files are compiled into the same library where the proto classes are used, but how can I prevent a future Client2 making this same mistake above?

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
kavin s | 21 Jun 15:17 2016
Picon

Protocol buffer encoding is corrupted when setting the bool variable to false (nested message)

I have a example message structure define as follows

message A {
        required string cmd = 1;
        optional MessageType1 message_type1 = 2;
        optional MessageType2 message_type2 = 3;
        optional MessageType3 message_typeN = N
};

message MessageType1 {

    optional dog d = 1;
    optional string msg = 2;

    message dog {
        optional bool isAnimal = 1;
    };
};

Constructing the message by setting the "cmd" field and "message_type1" field.

cmd = "Hello"

message_type1 {
    d {
           isAnimal : false
    }
    msg: "Dog"
}


The protocol buffer serialization for the above message is proper until the bool field value "isAnimal". Post the field name "isAnimal" data is corrupted , which means the "msg" field value is not encoded with the proper key . What i am observing is , the key value is encodes as zero post the "isAnimal" field name .

Note:  If i set the "isAnimal" field value to true , everything works as expected .

Please suggest me to come out of this problem .

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Ace Slelt | 18 Jun 03:20 2016
Picon

Using protocol buffers with ClassLibrary project in VS2015

I'm writting a plugin for rFactor to send data from the game to my app. This plugin is a .dll written in c++. When I want to use Protocol Buffers I'm getting some errors which in a winformapplication doesn't. I'm using Protocol Buffers 3.0 and these are my steps:

1- Compile the protobuf library in MDd runtime because that plugin is based in MDd.
2- Add all the include headers from google inside Visual Studio include.
3 -Compile protoc and extract my two files to add to my project.
4 - I added the files and link the lib to my project, this way : #pragma comment(lib,"libprotobuf.lib")
5 - Include "addressbook.pb.h" and addressbook.pb.cc
6 - Compile and getting the following errors.

I tried to use 2.6.1 and I have the same errors. I'm Lost...

1>addressbook.pb.obj : error LNK2019: símbolo externo "void __fastcall google::protobuf::internal::VerifyVersion(int,int,char const *)" (?VerifyVersion <at> internal <at> protobuf <at> google <at> <at> YIXHHPBD <at> Z) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AddDesc_addressbook_2eproto(void)" (?protobuf_AddDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "void __fastcall google::protobuf::internal::OnShutdown(void (__fastcall*)(void))" (?OnShutdown <at> internal <at> protobuf <at> google <at> <at> YIXP6IXXZ <at> Z) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AddDesc_addressbook_2eproto(void)" (?protobuf_AddDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "void __fastcall google::protobuf::GoogleOnceInitImpl(int *,class google::protobuf::Closure *)" (?GoogleOnceInitImpl <at> protobuf <at> google <at> <at> YIXPAHPAVClosure <at> 12 <at> <at> Z) sin resolver al que se hace referencia en la función "void __fastcall google::protobuf::GoogleOnceInit(int *,void (__fastcall*)(void))" (?GoogleOnceInit <at> protobuf <at> google <at> <at> YIXPAHP6IXXZ <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "void __fastcall google::protobuf::internal::InitEmptyString(void)" (?InitEmptyString <at> internal <at> protobuf <at> google <at> <at> YIXXZ) sin resolver al que se hace referencia en la función "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __fastcall google::protobuf::internal::GetEmptyString(void)" (?GetEmptyString <at> internal <at> protobuf <at> google <at> <at> YIABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> XZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static class google::protobuf::DescriptorPool const * __fastcall google::protobuf::DescriptorPool::generated_pool(void)" (?generated_pool <at> DescriptorPool <at> protobuf <at> google <at> <at> SIPBV123 <at> XZ) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AssignDesc_addressbook_2eproto(void)" (?protobuf_AssignDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::DescriptorPool::InternalAddGeneratedFile(void const *,int)" (?InternalAddGeneratedFile <at> DescriptorPool <at> protobuf <at> google <at> <at> SIXPBXH <at> Z) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AddDesc_addressbook_2eproto(void)" (?protobuf_AddDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static class google::protobuf::MessageFactory * __fastcall google::protobuf::MessageFactory::generated_factory(void)" (?generated_factory <at> MessageFactory <at> protobuf <at> google <at> <at> SIPAV123 <at> XZ) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AssignDesc_addressbook_2eproto(void)" (?protobuf_AssignDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const *,void (__fastcall*)(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &))" (?InternalRegisterGeneratedFile <at> MessageFactory <at> protobuf <at> google <at> <at> SIXPBDP6IXABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> <at> Z <at> Z) sin resolver al que se hace referencia en la función "void __fastcall tutorial::protobuf_AddDesc_addressbook_2eproto(void)" (?protobuf_AddDesc_addressbook_2eproto <at> tutorial <at> <at> YIXXZ)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(class google::protobuf::Descriptor const *,class google::protobuf::Message const *)" (?InternalRegisterGeneratedMessage <at> MessageFactory <at> protobuf <at> google <at> <at> SIXPBVDescriptor <at> 23 <at> PBVMessage <at> 23 <at> <at> Z) sin resolver al que se hace referencia en la función "void __fastcall tutorial::`anonymous namespace'::protobuf_RegisterTypes(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?protobuf_RegisterTypes <at> ?A0x8445cdb3 <at> tutorial <at> <at> YIXABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static unsigned char * __fastcall google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char *)" (?WriteStringWithSizeToArray <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> SIPAEABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> PAE <at> Z) sin resolver al que se hace referencia en la función "public: static unsigned char * __fastcall google::protobuf::internal::WireFormatLite::WriteStringToArray(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned char *)" (?WriteStringToArray <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SIPAEHABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> PAE <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static unsigned char * __fastcall google::protobuf::io::CodedOutputStream::WriteVarint64ToArray(unsigned __int64,unsigned char *)" (?WriteVarint64ToArray <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> SIPAE_KPAE <at> Z) sin resolver al que se hace referencia en la función "public: static unsigned char * __fastcall google::protobuf::io::CodedOutputStream::WriteVarint32SignExtendedToArray(int,unsigned char *)" (?WriteVarint32SignExtendedToArray <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> SIPAEHPAE <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "private: static unsigned char * __fastcall google::protobuf::io::CodedOutputStream::WriteVarint32FallbackToArray(unsigned int,unsigned char *)" (?WriteVarint32FallbackToArray <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> CIPAEIPAE <at> Z) sin resolver al que se hace referencia en la función "public: static unsigned char * __fastcall google::protobuf::io::CodedOutputStream::WriteTagToArray(unsigned int,unsigned char *)" (?WriteTagToArray <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> SIPAEIPAE <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "private: static int __fastcall google::protobuf::io::CodedOutputStream::VarintSize32Fallback(unsigned int)" (?VarintSize32Fallback <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> CIHI <at> Z) sin resolver al que se hace referencia en la función "public: static int __fastcall google::protobuf::io::CodedOutputStream::VarintSize32(unsigned int)" (?VarintSize32 <at> CodedOutputStream <at> io <at> protobuf <at> google <at> <at> SIHI <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static bool __fastcall google::protobuf::internal::WireFormatLite::ReadString(class google::protobuf::io::CodedInputStream *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (?ReadString <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SI_NPAVCodedInputStream <at> io <at> 34 <at> PAV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual bool __thiscall tutorial::Person::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream <at> Person <at> tutorial <at> <at> UAE_NPAVCodedInputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::WireFormatLite::WriteInt32(int,int,class google::protobuf::io::CodedOutputStream *)" (?WriteInt32 <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SIXHHPAVCodedOutputStream <at> io <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::Person::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes <at> Person <at> tutorial <at> <at> UBEXPAVCodedOutputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::WireFormatLite::WriteEnum(int,int,class google::protobuf::io::CodedOutputStream *)" (?WriteEnum <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SIXHHPAVCodedOutputStream <at> io <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::Person_PhoneNumber::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes <at> Person_PhoneNumber <at> tutorial <at> <at> UBEXPAVCodedOutputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class google::protobuf::io::CodedOutputStream *)" (?WriteStringMaybeAliased <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SIXHABV?$basic_string <at> DU?$char_traits <at> D <at> std <at> <at> V?$allocator <at> D <at> 2 <at> <at> std <at> <at> PAVCodedOutputStream <at> io <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::Person::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes <at> Person <at> tutorial <at> <at> UBEXPAVCodedOutputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(int,class google::protobuf::MessageLite const &,class google::protobuf::io::CodedOutputStream *)" (?WriteMessageMaybeToArray <at> WireFormatLite <at> internal <at> protobuf <at> google <at> <at> SIXHABVMessageLite <at> 34 <at> PAVCodedOutputStream <at> io <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::AddressBook::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes <at> AddressBook <at> tutorial <at> <at> UBEXPAVCodedOutputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::ReflectionOps::Merge(class google::protobuf::Message const &,class google::protobuf::Message *)" (?Merge <at> ReflectionOps <at> internal <at> protobuf <at> google <at> <at> SIXABVMessage <at> 34 <at> PAV534 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::AddressBook::MergeFrom(class google::protobuf::Message const &)" (?MergeFrom <at> AddressBook <at> tutorial <at> <at> UAEXABVMessage <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static bool __fastcall google::protobuf::internal::WireFormat::SkipField(class google::protobuf::io::CodedInputStream *,unsigned int,class google::protobuf::UnknownFieldSet *)" (?SkipField <at> WireFormat <at> internal <at> protobuf <at> google <at> <at> SI_NPAVCodedInputStream <at> io <at> 34 <at> IPAVUnknownFieldSet <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual bool __thiscall tutorial::AddressBook::MergePartialFromCodedStream(class google::protobuf::io::CodedInputStream *)" (?MergePartialFromCodedStream <at> AddressBook <at> tutorial <at> <at> UAE_NPAVCodedInputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static void __fastcall google::protobuf::internal::WireFormat::SerializeUnknownFields(class google::protobuf::UnknownFieldSet const &,class google::protobuf::io::CodedOutputStream *)" (?SerializeUnknownFields <at> WireFormat <at> internal <at> protobuf <at> google <at> <at> SIXABVUnknownFieldSet <at> 34 <at> PAVCodedOutputStream <at> io <at> 34 <at> <at> Z) sin resolver al que se hace referencia en la función "public: virtual void __thiscall tutorial::AddressBook::SerializeWithCachedSizes(class google::protobuf::io::CodedOutputStream *)const " (?SerializeWithCachedSizes <at> AddressBook <at> tutorial <at> <at> UBEXPAVCodedOutputStream <at> io <at> protobuf <at> google <at> <at> <at> Z)
1>addressbook.pb.obj : error LNK2019: símbolo externo "public: static unsigned char * __fastcall google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(class google::protobuf::UnknownFieldSet const &,unsigned char *)" (?SerializeUnknownFieldsToArray <at> WireFormat <at> internal <at> protobuf <at> google <at> <at> SIPAEABVUnknownFieldSet <at> 34 <at> PAE <at> Z) sin resolver al que se hace referencia en la función "public: virtual unsigned char * __thiscall tutorial::AddressBook::SerializeWithCachedSizesToArray(unsigned char *)const " (?SerializeWithCachedSizesToArray <at> AddressBook <at> tutorial <at> <at> UBEPAEPAE <at> Z)

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Ace Slelt | 18 Jun 05:22 2016
Picon

Use protocol buffer with Classlibrary project in Visual Studio 2015

I am writting a .dll plugin for rFactor, and I want to use protobuf to serialize data. I added my headers...the includes and stuff and worked properly. My problem is when I declare a variable from my protomessage to fill it suddenly the plugin doesn't work. Something really strange. I'm lost.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
a_teammate | 19 Jun 16:56 2016
Picon

Compatibility Issue + Max value for the indices/field numbers + are high field number slower?

Hey there,

This might a stupid question, but i haven't found anything certain in the docs/specs about that:

Our main goal is actually to keep compatibility while syncing a tree.

The protocol is actually just one giant oneof containing all possible paths for the tree:

message TreeNodeChanged { 
   oneof key { 
      sometype path_to_node1 = 1; 
      sometype path_to_node2 = 2; 
      ... 
    } 
 }

and thats already working.
The problem is however that we don't only want forward backward compability between server and client, but also sideways:
e.g. person A introduced message index 2 and also did person B, both meaning totally different things, but it should be recognized and ignored(/or maybe even accepted?! if we find a way to do this)


So the idea of my mate was to make the field number a hash of the path_to_node!
Candidates are e.g. a 32bit FNV-hash or maybe an adapted CRC32. This would both mean field numbers in a pretty high area.

Maybe we're going the totally wrong way here but following this path leads to the following issues:


1) what is the maximum value of the protobuf field numbers?

In the proto language specification it simply says its of type "intLit" and intLit is:

intLit = decimalLit | octalLit | hexLit decimalLit = ( "1" … "9" ) { decimalDigit } octalLit = "0" { octalDigit } hexLit = "0" ( "x" | "X" ) hexDigit { hexDigit }

So this means only decimal and hexadecimal values are actually allowed doesnt it?
Then however given:
decimalDigit = "0" … "9" hexDigit = "0" … "9" | "A" … "F" | "a" … "f"
 Means it has different limits for hex and int notation, is that correct?

I mean:

the max value for decimalLit is one billion-1 : "999 999 999"
according to this specs, which fits fine in a 32bit integer (with 30bits set)

but for base 16 its allowed length is 16! which would be awesome cause that
would mean an allowed integer size of  64bit.

So which one is true? Both?

which leads to issue 2:

1) are there issues with high field numbers

And are they even tested at all?

I've red elsewhere that "we have used field numbers in the range 50000-99999. This range is reserved for internal use within individual organizations"
which would suggest that even values above 50 000 are uncommen ..

Furthermore some people mentioned high values would suffer from beeing less performant, but: in how far is that relevant? Only because the index number consumes slightly more memory?


Well: Maybe we totally ask the wrong questions here and theres a much simpler logic already introduced or invented to better make protobuf message version independent, if yes we would be happy to hear them!

Thanks in advance and for reading all this stuff :)

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscribe <at> googlegroups.com.
To post to this group, send email to protobuf <at> googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Gmane