After removing all the incorrect "final"s we get to this:

1>test2\test.pb.cpp(46): error C2440: 'initializing': cannot convert from 
'void (__cdecl *)(void)' to 'int'
1>  test2\test.pb.cpp(46): note: There is no context in which this 
conversion is possible

For this generated code:

static void InitDefaultsscc_info_Message1_test_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::_Message1_default_instance_;
    new (ptr) ::Message1();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::Message1::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> 
scc_info_Message1_test_2eproto =
    
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
 
0, InitDefaultsscc_info_Message1_test_2eproto}, {}};

After examining the data structure, there is a missing initial value for 
SCCInfoBase::num_implicit_weak_deps, so I add that:

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> 
scc_info_Message1_test_2eproto =
    
{{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized),
 
0, 0, InitDefaultsscc_info_Message1_test_2eproto}, {}};

The next error is:

1>test2\test.pb.cpp(1049): error C2672: 
'google::protobuf::internal::WireFormatLite::InternalWriteMessageToArray': 
no matching overloaded function found

For this line:

  if (has_m1()) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessageToArray(
        2, _Internal::m1(this), target);
  }

At which point I run out of patience with it. I don't know where the 
io::EpsCopyOutputStream* stream is supposed to come from.

Do they just not test anything before releasing it? Geez, it's the most 
basic oneof example ever and it doesn't work. No mention anywhere that I 
can find on what compilers are supported. VS2015 isn't that old. But I 
guess I could try 2017.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/0af3c446-aa0f-4b40-b4a9-f03012f14150%40googlegroups.com.

Reply via email to