[protobuf] Re: Linking error with protobuf 2.6.1 while building ignition-messages0 on ubuntu 16.04

2019-07-11 Thread rishabh lal
Solved this by linking with protobuf 3.7, just linked in cmakelists.txt , 
Generator.cc with "protobuf::libprotoc protobuf::libprotobuf".

On Tuesday, July 9, 2019 at 2:15:37 PM UTC+5:30, rishabh lal wrote:
>
> I am trying to build ign-msgs (version 0) from source which is a 
> dependency for ignition transport 2 and gazebo 7. I installed protobuf from 
> ubuntu repos and downloaded ign-msgs0 from bitbucket. 
>
> The compilation &/or linking error I am facing is :-
>
> Linking CXX executable ign_msgs_gen
> CMakeFiles/ign_msgs_gen.dir/Generator.cc.o: In function 
> `google::protobuf::compiler::cpp::Generator::Generate(google::protobuf::FileDescriptor
>  
> const*, std::__cxx11::basic_string, 
> std::allocator > const&, 
> google::protobuf::compiler::GeneratorContext*, 
> std::__cxx11::basic_string, 
> std::allocator >*) const':
> /home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:84: 
> undefined reference to `google::protobuf::io::Printer::Print(char const*, 
> char const*, std::__cxx11::basic_string, 
> std::allocator > const&)'
> /home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:85: 
> undefined reference to `google::protobuf::io::Printer::Print(char const*, 
> char const*, std::__cxx11::basic_string, 
> std::allocator > const&)'
> /home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:86: 
> undefined reference to `google::protobuf::io::Printer::Print(char const*, 
> char const*, std::__cxx11::basic_string, 
> std::allocator > const&)'
> /home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:88: 
> undefined reference to `google::protobuf::io::Printer::Print(char const*, 
> char const*, std::__cxx11::basic_string, 
> std::allocator > const&)'
> /home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:89: 
> undefined reference to `google::protobuf::io::Printer::Print(char const*, 
> char const*, std::__cxx11::basic_string, 
> std::allocator > const&)'
> CMakeFiles/ign_msgs_gen.dir/Generator.cc.o:/home/deadmanlogan/i_am_from_source/ign-msgs-0/src/Generator.cc:90:
>  
> more undefined references to `google::protobuf::io::Printer::Print(char 
> const*, char const*, std::__cxx11::basic_string std::char_traits, std::allocator > const&)' follow
> collect2: error: ld returned 1 exit status
> src/CMakeFiles/ign_msgs_gen.dir/build.make:102: recipe for target 
> 'src/ign_msgs_gen' failed
> make[2]: *** [src/ign_msgs_gen] Error 1
> CMakeFiles/Makefile2:343: recipe for target 
> 'src/CMakeFiles/ign_msgs_gen.dir/all' failed
> make[1]: *** [src/CMakeFiles/ign_msgs_gen.dir/all] Error 2
> Makefile:162: recipe for target 'all' failed
> make: *** [all] Error 2
>
>  link for ign-msgs0 tarball 
> https://bitbucket.org/ignitionrobotics/ign-msgs/src/ign-msgs0/
>
> Please shine some light on this issue.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/c72bddeb-59df-4ef8-ab7f-73b5e957a969%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Linking error

2017-05-09 Thread dbbrealtimesoftware
Thanks for answer.
No I do not have any inline settings. I suspect the reason is that I use 
windows 7 since the linking problem disappears when I use windows 10!

On Saturday, April 29, 2017 at 2:23:20 AM UTC+2, Josh Haberman wrote:
>
> Those functions are marked "inline", so the compiler should not be 
> emitting references to them. Do you have any unusual inlining settings on 
> your compiler/project?
>
> On Friday, April 28, 2017 at 3:39:59 AM UTC-7, dbbrealti...@gmail.com 
>  wrote:
>>
>> Hi,
>> I am starting to use the protobuf library and have downloaded protobuff 
>> v3.2.0 for windows.
>> I have made up my <>.proto file and generated the <>.ph.h and <>.pb.cc 
>> files, build the protobuf libraries, created dll files for VC2015, produces 
>> the proc.exe file and included everything in a VS2015 project. All compile 
>> correct, but the linking fails as follows:
>>
>>  
>>
>> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
>> "__declspec(dllimport) public: void __cdecl 
>> google::protobuf::io::CodedInputStream::GetDirectBufferPointerInline(void 
>> const * *,int *)" 
>> (__imp_?GetDirectBufferPointerInline@CodedInputStream@io@protobuf@google@@QEAAXPEAPEBXPEAH@Z)
>>  
>> referenced in function "private: static bool __cdecl 
>> google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive(int,unsigned
>>  
>> int,class google::protobuf::io::CodedInputStream *,class 
>> google::protobuf::RepeatedField *)" 
>> (??$ReadRepeatedFixedSizePrimitive@N$00@WireFormatLite@internal@protobuf@google@@CA_NHIPEAVCodedInputStream@io@23@PEAV?$RepeatedField@N@23@@Z)
>>
>> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
>> "__declspec(dllimport) public: static unsigned char const * __cdecl 
>> google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char 
>> const *,unsigned int)" 
>> (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z)
>>  
>> referenced in function "private: static bool __cdecl 
>> google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive(int,unsigned
>>  
>> int,class google::protobuf::io::CodedInputStream *,class 
>> google::protobuf::RepeatedField *)" 
>> (??$ReadRepeatedFixedSizePrimitive@N$00@WireFormatLite@internal@protobuf@google@@CA_NHIPEAVCodedInputStream@io@23@PEAV?$RepeatedField@N@23@@Z)
>>
>> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
>> "__declspec(dllimport) public: void __cdecl 
>> google::protobuf::internal::ArenaStringPtr::ClearToEmptyNoArena(class 
>> std::basic_string,class 
>> std::allocator > const *)" 
>> (__imp_?ClearToEmptyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
>>  
>> referenced in function "public: virtual void __cdecl 
>> satscan_api_priscilla::carrier::Clear(void)" 
>> (?Clear@carrier@satscan_api_priscilla@@UEAAXXZ)
>>
>>  
>>
>> Can anybody able to help me?
>>
>>  
>>
>> Thanks, in advance.
>>
>>  
>>
>> /Dagfinn
>>
>

-- 
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.


[protobuf] Re: Linking error

2017-04-28 Thread 'Josh Haberman' via Protocol Buffers
Those functions are marked "inline", so the compiler should not be emitting 
references to them. Do you have any unusual inlining settings on your 
compiler/project?

On Friday, April 28, 2017 at 3:39:59 AM UTC-7, 
dbbrealtimesoftw...@gmail.com wrote:
>
> Hi,
> I am starting to use the protobuf library and have downloaded protobuff 
> v3.2.0 for windows.
> I have made up my <>.proto file and generated the <>.ph.h and <>.pb.cc 
> files, build the protobuf libraries, created dll files for VC2015, produces 
> the proc.exe file and included everything in a VS2015 project. All compile 
> correct, but the linking fails as follows:
>
>  
>
> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __cdecl 
> google::protobuf::io::CodedInputStream::GetDirectBufferPointerInline(void 
> const * *,int *)" 
> (__imp_?GetDirectBufferPointerInline@CodedInputStream@io@protobuf@google@@QEAAXPEAPEBXPEAH@Z)
>  
> referenced in function "private: static bool __cdecl 
> google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive(int,unsigned
>  
> int,class google::protobuf::io::CodedInputStream *,class 
> google::protobuf::RepeatedField *)" 
> (??$ReadRepeatedFixedSizePrimitive@N$00@WireFormatLite@internal@protobuf@google@@CA_NHIPEAVCodedInputStream@io@23@PEAV?$RepeatedField@N@23@@Z)
>
> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: static unsigned char const * __cdecl 
> google::protobuf::io::CodedInputStream::ExpectTagFromArray(unsigned char 
> const *,unsigned int)" 
> (__imp_?ExpectTagFromArray@CodedInputStream@io@protobuf@google@@SAPEBEPEBEI@Z)
>  
> referenced in function "private: static bool __cdecl 
> google::protobuf::internal::WireFormatLite::ReadRepeatedFixedSizePrimitive(int,unsigned
>  
> int,class google::protobuf::io::CodedInputStream *,class 
> google::protobuf::RepeatedField *)" 
> (??$ReadRepeatedFixedSizePrimitive@N$00@WireFormatLite@internal@protobuf@google@@CA_NHIPEAVCodedInputStream@io@23@PEAV?$RepeatedField@N@23@@Z)
>
> 1>protobuf_messages.pb.obj : error LNK2019: unresolved external symbol 
> "__declspec(dllimport) public: void __cdecl 
> google::protobuf::internal::ArenaStringPtr::ClearToEmptyNoArena(class 
> std::basic_string,class 
> std::allocator > const *)" 
> (__imp_?ClearToEmptyNoArena@ArenaStringPtr@internal@protobuf@google@@QEAAXPEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
>  
> referenced in function "public: virtual void __cdecl 
> satscan_api_priscilla::carrier::Clear(void)" 
> (?Clear@carrier@satscan_api_priscilla@@UEAAXXZ)
>
>  
>
> Can anybody able to help me?
>
>  
>
> Thanks, in advance.
>
>  
>
> /Dagfinn
>

-- 
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.