No mixing protobuf versions, clean protobuf build and project from 
https://developers.google.com/protocol-buffers/docs/cpptutorial

Linux --> Ok
Windows --> Fail



El martes, 7 de marzo de 2017, 23:11:22 (UTC+1), Adam Cozzette escribió:
>
> My first guess would be that you are somehow mixing different protobuf 
> versions: using generated code from a new version of protoc with a protobuf 
> runtime library of an older version. Is that true for your Windows setup?
>
> On Fri, Mar 3, 2017 at 3:19 AM, Mastic Cover <masti...@gmail.com 
> <javascript:>> wrote:
>
>> EDIT:
>>
>> Tested this:
>>
>>
>>
>> *# Google Protocol Buffers libraryINCLUDEPATH += 
>> "C:\\protobuf\\install\\include"LIBS += -L"C:\\protobuf\\install\\lib" 
>> -llibprotobuf*
>>
>> And this one:
>>
>>
>>
>> *# Google Protocol Buffers libraryINCLUDEPATH += 
>> "C:\\protobuf\\install\\include"LIBS += -L"C:\\protobuf\\install\\lib" 
>> -lprotobuf*
>>
>>
>> Same result over and over again.
>>
>>
>>
>>
>>
>> El viernes, 3 de marzo de 2017, 12:16:14 (UTC+1), Mastic Cover escribió:
>>>
>>> Hi everyone,
>>>
>>> I'm trying to build Protobuf with Minwg from MSYS2 as specified in 
>>> documentation (C++ Installation - Windows). Everything goes perfect and all 
>>> libraries are created.
>>>
>>> The problem comes trying to compile and test the "addressbook" sample in 
>>> Qt/C++. After generating the .pb.cc and .pb.h, I add this to my .pro file 
>>> inside my Qt project:
>>>
>>>
>>>
>>>
>>> *# Google Protocol Buffers libraryINCLUDEPATH += 
>>> "C:\\protobuf\\install\\include"LIBS += -L"C:\\protobuf\\install\\lib" 
>>> -llibprotobuf*
>>>
>>>
>>> A lot of "undefined reference" errors (almost 200 errors) are shown and 
>>> I am not able to make it work:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *C:\Qt Developments\MyProject\protoFolder\addressbook.pb.cc:86 
>>> <http://addressbook.pb.cc:86>: error: undefined reference to 
>>> `google::protobuf::internal::AssignDescriptors(std::string 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**)'C:\Qt 
>>> Developments\MyProject\protoFolder\addressbook.pb.cc:97 
>>> <http://addressbook.pb.cc:97>: error: undefined reference to 
>>> `google::protobuf::internal::RegisterAllTypes(google::protobuf::Metadata 
>>> const*, int)'C:\Qt Developments\MyProject\protoFolder\addressbook.pb.cc:112 
>>> <http://addressbook.pb.cc:112>: error: undefined reference to 
>>> `google::protobuf::internal::VerifyVersion(int, int, char const*)'And so 
>>> on...*
>>>
>>> Has anyone ever come across this error? Same proccess, same project, 
>>> tested in a Fedora machine... it works like a charm! But I have to make it 
>>> work on Windows :(
>>>
>>> Thanks in advance for your help.
>>>
>>> Mastic.
>>>
>> -- 
>> 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+u...@googlegroups.com <javascript:>.
>> To post to this group, send email to prot...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to