On Mon, Dec 14, 2015 at 10:11 PM, Girish H T <htgir...@gmail.com> wrote:

> Hello experts,
>
> I am porting protobuf on wince arm platform.I have understood that
> protobuf-lite already has support for this. I want to use protobuf instead
> of protobuf-lite.
>
> While compiling i came across the compilation issues saying arm wince is
> not supported platform. Below are the errors.
>
> protobuf\interface\google\protobuf\stubs\atomicops.h(174) : error C2121:
> '#' : invalid character : possibly the result of a macro expansion
> protobuf\interface\google\protobuf\stubs\atomicops.h(174) : error C2143:
> syntax error : missing ';' before 'string'
> protobuf\interface\google\protobuf\stubs\atomicops.h(174) : error C4430:
> missing type specifier - int assumed. Note: C++ does not support default-int
> protobuf\interface\google\protobuf\stubs\once.h(84) : error C2143: syntax
> error : missing ';' before '{'
> protobuf\interface\google\protobuf\stubs\once.h(84) : error C2447: '{' :
> missing function header (old-style formal list?)
> protobuf\interface\google\protobuf\generated_message_util.h(75) : error
> C2146: syntax error : missing ';' before identifier
> 'empty_string_once_init_'
> protobuf\interface\google\protobuf\generated_message_util.h(75) : error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int
> protobuf\interface\google\protobuf\generated_message_util.h(75) : error
> C4430: missing type specifier - int assumed. Note: C++ does not support
> default-int
> protobuf\interface\google\protobuf\generated_message_util.h(84) : error
> C2039: 'GoogleOnceInit' : is not a member of 'google::protobuf'
> protobuf\interface\google\protobuf\generated_message_util.h(84) : error
> C3861: 'GoogleOnceInit': identifier not found
> protobuf\interface\google\protobuf\io\coded_stream.h(121) : warning C4068:
> unknown pragma
> protobuf\interface\google\protobuf\io\coded_stream.h(1219) : warning
> C4068: unknown pragma
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C2039: 'ProtobufOnceType' : is not a member of
> 'google::protobuf'
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C2146: syntax error : missing ';' before
> identifier 'protobuf_AssignDescriptors_once_'
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C4430: missing type specifier - int assumed. Note:
> C++ does not support default-int
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C4430: missing type specifier - int assumed. Note:
> C++ does not support default-int
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C2039: 'ONCE_STATE_UNINITIALIZED' : is not a
> member of 'google::protobuf'
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(190) : error C2065: 'ONCE_STATE_UNINITIALIZED' : undeclared
> identifier
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(192) : error C2039: 'GoogleOnceInit' : is not a member of
> 'google::protobuf'
>
> d:\perforce\mil_wince_dev\build\output\windows-wince-arm-msvc9\engines\mapmatching\mapdataprovider\common\protogeneration\protobufs\
> arc.pb.cc(192) : error C3861: 'GoogleOnceInit': identifier not found
>
> and so on .................................
>
> From the compilation errors i understand that root cause is atomic
> operations for arm wince is not implemented.
>
> Can you please suggest how can i implement atomic operations for arm-wince
> ?
>
Does your compiler supports C++11 atomics? If so I guess you can wrap the
C++11 atomic header to provide the needed atomic function for arm-wince.
Otherwise you will need to find out what native atomic instructions you can
use for atomic ops.

If you are only using protobuf in a single thread, you can also define
GOOGLE_PROTOBUF_NO_THREAD_SAFETY
to disable atomic ops.


> Is there any particular reason why i cant find atomic operations for
> arm-wince (I googled to check if atomic operations for any open sources to
> see if i can reuse for arm-wince).
>
> Let me know your suggestions on this.
>
> Regards
> GHT
>
> --
> 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.
>

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