Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unresolved external symbol when compile protoc with vs2015CTP in release mode (protobuf-3.0.0-alpha-2) #240

Closed
toddwong opened this issue Mar 13, 2015 · 27 comments
Assignees

Comments

@toddwong
Copy link

The following error reported:

libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Message * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::NewFromPrototype(class google::protobuf::Message const *,class google::protobuf::Arena *)" (?NewFromPrototype@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPAVMessage@34@PBV534@PAVArena@34@@Z) referenced in function "private: void __thiscall google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(void * *,void * *,int,int)" (??$MergeFromInnerLoop@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@AAEXPAPAX0HH@Z)

And a suspicious warning:

..\src\google\protobuf\generated_message_reflection.cc(2152): warning C4506: no definition for inline function 'google::protobuf::Message *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(const GenericType *,google::protobuf::Arena *)'
          with
          [
              GenericType=google::protobuf::Message
          ]

The full output:

1>------ Build started: Project: libprotobuf, Configuration: Release Win32 ------
1>  arena.cc
1>  arenastring.cc
1>  importer.cc
1>  parser.cc
1>  descriptor.cc
1>  descriptor.pb.cc
1>  descriptor_database.cc
1>  dynamic_message.cc
1>  extension_set.cc
1>  extension_set_heavy.cc
1>  generated_message_reflection.cc
1>..\src\google\protobuf\generated_message_reflection.cc(2152): warning C4506: no definition for inline function 'google::protobuf::Message *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(const GenericType *,google::protobuf::Arena *)'
1>          with
1>          [
1>              GenericType=google::protobuf::Message
1>          ]
1>  generated_message_util.cc
1>  coded_stream.cc
1>  gzip_stream.cc
1>  printer.cc
1>  strtod.cc
1>  tokenizer.cc
1>  zero_copy_stream.cc
1>  zero_copy_stream_impl.cc
1>  zero_copy_stream_impl_lite.cc
1>  Generating Code...
1>  Compiling...
1>  map_field.cc
1>  message.cc
1>  message_lite.cc
1>  reflection_ops.cc
1>  repeated_field.cc
1>  service.cc
1>  atomicops_internals_x86_gcc.cc
1>  atomicops_internals_x86_msvc.cc
1>  common.cc
1>  once.cc
1>  stringprintf.cc
1>  structurally_valid.cc
1>  strutil.cc
1>..\src\google\protobuf\stubs\strutil.cc(1229): warning C4456: declaration of 'snprintf_result' hides previous local declaration
1>  ..\src\google\protobuf\stubs\strutil.cc(1213): note: see declaration of 'snprintf_result'
1>..\src\google\protobuf\stubs\strutil.cc(1278): warning C4456: declaration of 'snprintf_result' hides previous local declaration
1>  ..\src\google\protobuf\stubs\strutil.cc(1268): note: see declaration of 'snprintf_result'
1>  substitute.cc
1>  text_format.cc
1>  unknown_field_set.cc
1>  wire_format.cc
1>  wire_format_lite.cc
1>  Generating Code...
1>  libprotobuf.vcxproj -> D:\protobuf-3.0.0-alpha-2\vsprojects\Release\libprotobuf.lib
2>------ Build started: Project: libprotoc, Configuration: Release Win32 ------
2>  code_generator.cc
2>  command_line_interface.cc
2>  cpp_enum.cc
2>  cpp_enum_field.cc
2>  cpp_extension.cc
2>  cpp_field.cc
2>  cpp_file.cc
2>  cpp_generator.cc
2>  cpp_helpers.cc
2>  cpp_map_field.cc
2>  cpp_message.cc
2>  cpp_message_field.cc
2>  cpp_primitive_field.cc
2>  cpp_service.cc
2>  cpp_string_field.cc
2>  javanano_enum.cc
2>  javanano_enum_field.cc
2>  javanano_extension.cc
2>  javanano_field.cc
2>  javanano_file.cc
2>  Generating Code...
2>  Compiling...
2>  javanano_generator.cc
2>  javanano_helpers.cc
2>  javanano_map_field.cc
2>  javanano_message.cc
2>  javanano_message_field.cc
2>  javanano_primitive_field.cc
2>  java_context.cc
2>  java_doc_comment.cc
2>  java_enum.cc
2>  java_enum_field.cc
2>  java_extension.cc
2>  java_field.cc
2>  java_file.cc
2>  java_generator.cc
2>  java_generator_factory.cc
2>  java_helpers.cc
2>  java_lazy_message_field.cc
2>  java_map_field.cc
2>  java_message.cc
2>  java_message_field.cc
2>  Generating Code...
2>  Compiling...
2>  java_name_resolver.cc
2>  java_primitive_field.cc
2>  java_service.cc
2>  java_shared_code_generator.cc
2>  java_string_field.cc
2>  plugin.cc
2>  plugin.pb.cc
2>  python_generator.cc
2>..\src\google\protobuf\compiler\python\python_generator.cc(705): warning C4456: declaration of 'm' hides previous local declaration
2>  ..\src\google\protobuf\compiler\python\python_generator.cc(645): note: see declaration of 'm'
2>  ruby_generator.cc
2>  subprocess.cc
2>  zip_writer.cc
2>  Generating Code...
2>  libprotoc.vcxproj -> D:\protobuf-3.0.0-alpha-2\vsprojects\Release\libprotoc.lib
3>------ Build started: Project: protoc, Configuration: Release Win32 ------
3>  main.cc
3>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
3>libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Message * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::NewFromPrototype(class google::protobuf::Message const *,class google::protobuf::Arena *)" (?NewFromPrototype@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPAVMessage@34@PBV534@PAVArena@34@@Z) referenced in function "private: void __thiscall google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(void * *,void * *,int,int)" (??$MergeFromInnerLoop@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@AAEXPAPAX0HH@Z)
3>Release\protoc.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any suggestion or workaround will be appreciated.

@toddwong toddwong changed the title unresolved external symbol when compile protoc with visual studio 2015 ctp in release mode unresolved external symbol when compile protoc with vs2015CTP in release mode (protobuf-3.0.0-alpha-2) Mar 13, 2015
@liujisi
Copy link
Contributor

liujisi commented Mar 16, 2015

The warning looks suspicious indeed. Might be a VS2015 bug? Probably worth a bug report to the VS community as well.

@breathe67
Copy link

I'm having this problem too, right after migrating my project to VC 2015 Community RC. I posted a brief note on the Microsoft community forum referencing this thread.

@Waty
Copy link

Waty commented May 11, 2015

Same problem here

@ml232528
Copy link

+1

@toddwong toddwong closed this as completed Jul 7, 2015
@toddwong
Copy link
Author

toddwong commented Jul 7, 2015

The problem has gone with visual studio 2015 rc. So this is indeed a bug of vs, not protobuf.

@breathe67
Copy link

Did MS just release a new 2015 RC ? The error showed up when I switched to
2015 RC (community) about two months ago.

On Tue, Jul 7, 2015 at 9:07 AM, toddwong notifications@github.com wrote:

The problem has gone with visual studio 2015 rc. So this is indeed a bug
of vs, not protobuf.


Reply to this email directly or view it on GitHub
#240 (comment).

@Waty
Copy link

Waty commented Jul 7, 2015

I can still reprocude this issue using Microsoft Visual Studio Enterprise 2015 RC and protobuf v3.0.0-alpha-3.1.
The project compiles correctly in debug configuration, but release mode throws the following error:

libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Message * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::NewFromPrototype(class google::protobuf::Message const *,class google::protobuf::Arena *)" (?NewFromPrototype@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPAVMessage@34@PBV534@PAVArena@34@@Z) referenced in function "private: void __thiscall google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(void * *,void * *,int,int)" (??$MergeFromInnerLoop@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@AAEXPAPAX0HH@Z)

And this warning:

1>  generated_message_reflection.cc
1>..\src\google\protobuf\generated_message_reflection.cc(2157): warning C4506: no definition for inline function 'google::protobuf::Message *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(const GenericType *,google::protobuf::Arena *)'
1>          with
1>          [
1>              GenericType=google::protobuf::Message
1>          ]

@toddwong toddwong reopened this Jul 8, 2015
@toddwong
Copy link
Author

toddwong commented Jul 8, 2015

I'm sorry , I mess up the build configurations. The issue still there in release mode.

@amirrony
Copy link

Hey,

Any fix or workaround for this problem?

How can I solve it for creating a release binary in VS 2015 (community)

@breathe67
Copy link

No fix for me, for now just building protoc in debug mode, and
protobuf-lite in release mode...
On Jul 11, 2015 3:23 AM, "amirrony" notifications@github.com wrote:

Hey,

Any fix or workaround for this problem?

How can I solve it for creating a release binary in VS 2015 (community)


Reply to this email directly or view it on GitHub
#240 (comment).

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jul 15, 2015

I agree with @pherl's assessment that this is probably a vs 2015 bug rather than a protobuf one. Although I haven't been able to reproduce the exact problem in a simple program, I suspect the issue is related to declaration of specification of class template member functions.

I mirrored the code structure of GenericTypeHandler with something like this:

// foo.h
template class Foo {
 public:
  static void Call() {}
};
template<>
void Foo::Call();
// foo.cc
#include "foo.h"
template<>
void Foo::Call() {}
#include "foo.h"
int main() { Foo::Call(); }

But when I tested the above program, it consistently fails with "Unresolved external symbol" error in both debug and release build. Not sure why protobuf code can still build debug build.

@Waty
Copy link

Waty commented Jul 20, 2015

Error is still occuring in the final release of VS2015 Enterprise

@ml232528
Copy link

If such changes can be compiled through

modify message.h
#include "google/protobuf/repeated_field.h"
...
namespace internal {
// Macro defined in repeated_field.h. We can only define the Message-specific
// GenericTypeHandler specializations here because we depend on Message, which
// is not part of proto2-lite hence is not available in repeated_field.h.
DEFINE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES_NOINLINE(Message);
} // namespace internal

} // namespace protobuf

} // namespace google
#endif // GOOGLE_PROTOBUF_MESSAGE_H__

modify message.cc
//DEFINE_SPECIALIZATIONS_FOR_BASE_PROTO_TYPES_NOINLINE(Message);

9> 正在生成代码...
9>LINK : warning LNK4075: 忽略“/INCREMENTAL”(由于“/OPT:ICF”规范)
9> tests.vcxproj -> D:\项目文件\google\protobuf-3.0.0-alpha-2\vsprojects\Release\tests.exe
========== 生成: 成功 9 个,失败 0 个,最新 0 个,跳过 0 个 ==========

@mloskot
Copy link

mloskot commented Aug 5, 2015

I can reproduce the problem while building the "2015-05-25 version 3.0.0-alpha-3" from the master with Visual Studio Professional 2015 (Version 14.0.23107.0 D14REL):

  • x64 build
D:\dev\protobuf\protobuf.git\cmake\_build>"c:\Program Files (x86)\CMake\bin\cmake.exe" -G "Visual Studio 14 2015 Win64" -DBUILD_TESTING=OFF ..
-- The C compiler identification is MSVC 19.0.23026.0
-- The CXX compiler identification is MSVC 19.0.23026.0
-- Check for working C compiler using: Visual Studio 14 2015 Win64
-- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/protobuf/protobuf.git/cmake/_build
  • Debug builds with success
  • Release fails at linking:
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>  Checking Build System
1>  CMake does not need to re-run because D:/dev/protobuf/protobuf.git/cmake/_build/CMakeFiles/generate.stamp is up-to-date.
2>------ Build started: Project: libprotobuf, Configuration: Release x64 ------
3>------ Build started: Project: libprotobuf-lite, Configuration: Release x64 ------
2>  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
2>  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
3>  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
3>  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
2>  arena.cc
3>  arena.cc
2>  arenastring.cc
3>  arenastring.cc
2>  extension_set.cc
3>  extension_set.cc
2>  generated_message_util.cc
3>  generated_message_util.cc
2>  coded_stream.cc
3>  coded_stream.cc
2>  zero_copy_stream.cc
3>  zero_copy_stream.cc
2>  zero_copy_stream_impl_lite.cc
3>  zero_copy_stream_impl_lite.cc
3>  message_lite.cc
2>  message_lite.cc
2>  repeated_field.cc
3>  repeated_field.cc
2>  atomicops_internals_x86_gcc.cc
3>  atomicops_internals_x86_gcc.cc
3>  atomicops_internals_x86_msvc.cc
2>  atomicops_internals_x86_msvc.cc
3>  bytestream.cc
2>  bytestream.cc
3>  common.cc
2>  common.cc
3>  once.cc
2>  once.cc
3>  status.cc
2>  status.cc
3>  statusor.cc
2>  statusor.cc
3>  stringpiece.cc
2>  stringpiece.cc
3>  stringprintf.cc
2>  stringprintf.cc
3>  strutil.cc
2>  strutil.cc
3>  time.cc
2>  time.cc
3>  Generating Code...
2>  Generating Code...
3>  Compiling...
3>  wire_format_lite.cc
2>  Compiling...
2>  wire_format_lite.cc
3>  Generating Code...
2>  any.cc
3>  libprotobuf-lite.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf-lite.lib
2>  any.pb.cc
2>  api.pb.cc
2>  importer.cc
2>  parser.cc
2>  descriptor.cc
2>  descriptor.pb.cc
2>  descriptor_database.cc
2>  duration.pb.cc
2>  dynamic_message.cc
2>  empty.pb.cc
2>  extension_set_heavy.cc
2>  field_mask.pb.cc
2>  generated_message_reflection.cc
2>D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc(2157): warning C4506: no definition for inline function 'google::protobuf::Message *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::NewFromPrototype(const GenericType *,google::protobuf::Arena *)'
2>          with
2>          [
2>              GenericType=google::protobuf::Message
2>          ]
2>  gzip_stream.cc
2>  printer.cc
2>  strtod.cc
2>  tokenizer.cc
2>  zero_copy_stream_impl.cc
2>  Generating Code...
2>  Compiling...
2>  map_field.cc
2>  message.cc
2>  reflection_ops.cc
2>  service.cc
2>  source_context.pb.cc
2>  struct.pb.cc
2>  mathlimits.cc
2>  structurally_valid.cc
2>  substitute.cc
2>  text_format.cc
2>  timestamp.pb.cc
2>  type.pb.cc
2>  unknown_field_set.cc
2>  field_comparator.cc
2>  datapiece.cc
2>  default_value_objectwriter.cc
2>  error_listener.cc
2>  field_mask_utility.cc
2>  json_escaping.cc
2>  json_objectwriter.cc
2>  Generating Code...
2>  Compiling...
2>  json_stream_parser.cc
2>  object_writer.cc
2>  protostream_objectsource.cc
2>  protostream_objectwriter.cc
2>  type_info.cc
2>  type_info_test_helper.cc
2>  utility.cc
2>  json_util.cc
2>  message_differencer.cc
2>  type_resolver_util.cc
2>  wire_format.cc
2>  wrappers.pb.cc
2>  Generating Code...
2>  libprotobuf.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf.lib
4>------ Build started: Project: libprotoc, Configuration: Release x64 ------
4>  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
4>  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
4>  code_generator.cc
4>  command_line_interface.cc
4>  cpp_enum.cc
4>  cpp_enum_field.cc
4>  cpp_extension.cc
4>  cpp_field.cc
4>  cpp_file.cc
4>  cpp_generator.cc
4>  cpp_helpers.cc
4>  cpp_map_field.cc
4>  cpp_message.cc
4>  cpp_message_field.cc
4>  cpp_primitive_field.cc
4>  cpp_service.cc
4>  cpp_string_field.cc
4>  csharp_enum.cc
4>  csharp_enum_field.cc
4>  csharp_field_base.cc
4>  csharp_generator.cc
4>  csharp_helpers.cc
4>  Generating Code...
4>  Compiling...
4>  csharp_map_field.cc
4>  csharp_message.cc
4>  csharp_message_field.cc
4>  csharp_primitive_field.cc
4>  csharp_repeated_enum_field.cc
4>  csharp_repeated_message_field.cc
4>  csharp_repeated_primitive_field.cc
4>  csharp_source_generator_base.cc
4>  csharp_umbrella_class.cc
4>  csharp_wrapper_field.cc
4>  java_context.cc
4>  java_doc_comment.cc
4>  java_enum.cc
4>  java_enum_field.cc
4>  java_enum_field_lite.cc
4>  java_extension.cc
4>  java_field.cc
4>  java_file.cc
4>  java_generator.cc
4>  java_generator_factory.cc
4>  Generating Code...
4>  Compiling...
4>  java_helpers.cc
4>  java_lazy_message_field.cc
4>  java_lazy_message_field_lite.cc
4>  java_map_field.cc
4>  java_map_field_lite.cc
4>  java_message.cc
4>  java_message_builder.cc
4>  java_message_builder_lite.cc
4>  java_message_field.cc
4>  java_message_field_lite.cc
4>  java_message_lite.cc
4>  java_name_resolver.cc
4>  java_primitive_field.cc
4>  java_primitive_field_lite.cc
4>  java_service.cc
4>  java_shared_code_generator.cc
4>  java_string_field.cc
4>  java_string_field_lite.cc
4>  javanano_enum.cc
4>  javanano_enum_field.cc
4>  Generating Code...
4>  Compiling...
4>  javanano_extension.cc
4>  javanano_field.cc
4>  javanano_file.cc
4>  javanano_generator.cc
4>  javanano_helpers.cc
4>  javanano_map_field.cc
4>  javanano_message.cc
4>  javanano_message_field.cc
4>  javanano_primitive_field.cc
4>  objectivec_enum.cc
4>  objectivec_enum_field.cc
4>  objectivec_extension.cc
4>  objectivec_field.cc
4>  objectivec_file.cc
4>  objectivec_generator.cc
4>  objectivec_helpers.cc
4>  objectivec_map_field.cc
4>  objectivec_message.cc
4>  objectivec_message_field.cc
4>  objectivec_oneof.cc
4>  Generating Code...
4>  Compiling...
4>  objectivec_primitive_field.cc
4>  plugin.cc
4>  plugin.pb.cc
4>  python_generator.cc
4>  ruby_generator.cc
4>  subprocess.cc
4>  zip_writer.cc
4>  Generating Code...
4>  libprotoc.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotoc.lib
5>------ Build started: Project: protoc, Configuration: Release x64 ------
5>  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
5>  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
5>  main.cc
5>libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Message * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::NewFromPrototype(class google::protobuf::Message const *,class google::protobuf::Arena *)" (?NewFromPrototype@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAVMessage@34@PEBV534@PEAVArena@34@@Z) referenced in function "private: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::MergeFromInnerLoop<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(void * *,void * *,int,int)" (??$MergeFromInnerLoop@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@AEAAXPEAPEAX0HH@Z)
5>D:\dev\protobuf\protobuf.git\cmake\_build\Release\protoc.exe : fatal error LNK1120: 1 unresolved externals
6>------ Skipped Build: Project: ALL_BUILD, Configuration: Release x64 ------
6>Project not selected to build for this solution configuration 
========== Build: 4 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

@Uli1
Copy link

Uli1 commented Aug 12, 2015

A quick and dirty hack for VS2015 x64 release build is to add another function implemetation into

generated_message_reflection.cc
...
namespace internal {
...
template<>
Message* GenericTypeHandler::NewFromPrototype(
const Message* prototype, google::protobuf::Arena* arena) {
return prototype->New(arena);
}
...

@mloskot
Copy link

mloskot commented Aug 20, 2015

Pull request #717 fixes this issue.

@DouglasHeriot
Copy link
Contributor

Ha, I didn’t even see this issue – yes my pull request #717 is a workaround for exactly this.
While I haven’t looked into it too closely, it does seem like a bug in the VS compiler.
I have not run any performance tests to see if there’s major side effects of disabling inlining in the single file message.cc.

DouglasHeriot added a commit to DouglasHeriotDesign/protobuf that referenced this issue Aug 21, 2015
…ase build compiler bug.

See issue protocolbuffers#240 - MSVC in VS2015 seems to inline a function it shouldn't. My original workaround was to disable inlining for the whole file, but I found a way to do it on just this specific function using __declspec(noinline).
Unfortunately __declspec has to go at the start of the function declaration, while __attribute in GCC can go either before or after. I had to move lots of GOOGLE_ATTRIBUTE_NOLINE to make it compile. I have not yet tested this change with GCC.

Will there be other side effects of defining this, given it wasn't previously?

I also noticed a few functions marked with both the 'inline' keyword, and GOOGLE_ATTRIBUTE_NOINLINE - huh? Is there an explanation for this, or is it an oversight?
@DouglasHeriot
Copy link
Contributor

This should be fixed since pull request #726 has now been merged – I marked just the problematic function as __declspec(noinline) if the compiler is VS ≥ 2015.

Can someone verify and close this issue?

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Aug 26, 2015

@TeBoring please help verify if it's working now for VS2015.

@0xAAE
Copy link
Contributor

0xAAE commented Aug 30, 2015

For now, I should add next 4 lines to message.cc file:
#if defined(_MSC_VER) && (_MSC_VER >= 1900)
// Note: force noinline to workaround MSVC 2015 compiler bug, issue #240
GOOGLE_ATTRIBUTE_NOINLINE
#endif

after template<> and before
google::protobuf::Arena* GenericTypeHandler::GetArena(

and after template<> and before
void* GenericTypeHandler::GetMaybeArenaPointer(

Theese methods are imediately after fixed in #726 Message* GenericTypeHandler::NewFromPrototype(...)

After this everything has built OK in MCVS 2015 Community Edition

@mloskot
Copy link

mloskot commented Aug 31, 2015

@xfxyjwf FYI, I confirm #726 has NOT fixed the problem. I have just updated my copy of the master and tried to build it with VS2015:

D:\dev\protobuf\protobuf.git\cmake\_build>"c:\Program Files (x86)\CMake\bin\cmake.exe" -G "Visual Studio 14 2015 Win64" -DBUILD_TESTING=OFF .. 
-- The C compiler identification is MSVC 19.0.23026.0
-- The CXX compiler identification is MSVC 19.0.23026.0
-- Check for working C compiler using: Visual Studio 14 2015 Win64
-- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64
-- Check for working CXX compiler using: Visual Studio 14 2015 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - not found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dev/protobuf/protobuf.git/cmake/_build

D:\dev\protobuf\protobuf.git\cmake\_build>REM "C:\Program Files (x86)\Xoreax\IncrediBuild\buildconsole.EXE" /nologo /usemsbuild /vsversion="vc14" /build /Cfg="Release|x64" protobuf.sln 

D:\dev\protobuf\protobuf.git\cmake\_build>msbuild /p:Configuration="Release" /p:Platform="x64" protobuf.sln 
Microsoft (R) Build Engine version 14.0.23107.0
Copyright (C) Microsoft Corporation. All rights reserved.

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 31/08/2015 15:48:52.
Project "D:\dev\protobuf\protobuf.git\cmake\_build\protobuf.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|x64".
ValidateProjects:
  The project "INSTALL" is not selected for building in solution configuration "Release|x64".
Project "D:\dev\protobuf\protobuf.git\cmake\_build\protobuf.sln" (1) is building "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) on node 1 (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) is building "D:\dev\protobuf\protobuf.git\cmake\_build\ZERO_CHECK.vcxproj" (3) on node 1 (default targets).
PrepareForBuild:
  Creating directory "x64\Release\ZERO_CHECK\".
  Creating directory "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
  Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Checking Build System
  CMake does not need to re-run because D:/dev/protobuf/protobuf.git/cmake/_build/CMakeFiles/generate.stamp is up-to-date.
FinalizeBuildStatus:
  Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
  Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\ZERO_CHECK.vcxproj" (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj.metaproj" (4) on node 1 (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj.metaproj" (4) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj" (5) on node 1 (default targets).
PrepareForBuild:
  Creating directory "libprotobuf.dir\Release\".
  Creating directory "D:\dev\protobuf\protobuf.git\cmake\_build\Release\".
  Creating directory "libprotobuf.dir\Release\libprotobuf.tlog\".
InitializeBuildStatus:
  Creating "libprotobuf.dir\Release\libprotobuf.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe /c /ID:\dev\protobuf\protobuf.git\cmake\_build /ID:\dev\protobuf\protobuf.git\src /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D LIBPROTOBUF_EXPORTS /D GOOGLE_PROTOBUF_CMAKE_BUILD /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"libprotobuf.dir\Release\\" /Fd"libprotobuf.dir\Release\libprotobuf.pdb" /Gd /TP /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /errorReport:queue D:\dev\protobuf\protobuf.git\src\google\protobuf\arena.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\arenastring.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\extension_set.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\coded_stream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\zero_copy_stream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\zero_copy_stream_impl_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\message_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\repeated_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\bytestream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\common.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\int128.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\once.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\status.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\statusor.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\stringpiece.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\stringprintf.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\structurally_valid.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\strutil.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\time.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\wire_format_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\any.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\any.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\api.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\importer.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\parser.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\descriptor.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\descriptor.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\descriptor_database.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\duration.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\dynamic_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\empty.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\extension_set_heavy.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\field_mask.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\gzip_stream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\printer.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\strtod.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\tokenizer.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\zero_copy_stream_impl.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\reflection_ops.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\service.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\source_context.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\struct.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\mathlimits.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\substitute.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\text_format.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\timestamp.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\type.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\unknown_field_set.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\field_comparator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\field_mask_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\datapiece.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\default_value_objectwriter.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\error_listener.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\field_mask_utility.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\json_escaping.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\json_objectwriter.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\json_stream_parser.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\object_writer.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\protostream_objectsource.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\protostream_objectwriter.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\type_info.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\type_info_test_helper.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\internal\utility.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\json_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\message_differencer.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\time_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\util\type_resolver_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\wire_format.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\wrappers.pb.cc
  arena.cc
  arenastring.cc
  extension_set.cc
  generated_message_util.cc
  coded_stream.cc
  zero_copy_stream.cc
  zero_copy_stream_impl_lite.cc
  message_lite.cc
  repeated_field.cc
  atomicops_internals_x86_gcc.cc
  atomicops_internals_x86_msvc.cc
  bytestream.cc
  common.cc
  int128.cc
  once.cc
  status.cc
  statusor.cc
  stringpiece.cc
  stringprintf.cc
  structurally_valid.cc
  Generating Code...
  Compiling...
  strutil.cc
  time.cc
  wire_format_lite.cc
  any.cc
  any.pb.cc
  api.pb.cc
  importer.cc
  parser.cc
  descriptor.cc
  descriptor.pb.cc
  descriptor_database.cc
  duration.pb.cc
  dynamic_message.cc
  empty.pb.cc
  extension_set_heavy.cc
  field_mask.pb.cc
  generated_message_reflection.cc
D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc(2276): warning C4506: no definition for inline function 'google::protobuf::Arena *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetArena(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
          with
          [
              GenericType=google::protobuf::Message
          ]
D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc(2276): warning C4506: no definition for inline function 'void *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetMaybeArenaPointer(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
          with
          [
              GenericType=google::protobuf::Message
          ]
  gzip_stream.cc
  printer.cc
  strtod.cc
  Generating Code...
  Compiling...
  tokenizer.cc
  zero_copy_stream_impl.cc
  map_field.cc
D:\dev\protobuf\protobuf.git\src\google\protobuf\map_field.cc(467): warning C4506: no definition for inline function 'google::protobuf::Arena *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetArena(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
          with
          [
              GenericType=google::protobuf::Message
          ]
D:\dev\protobuf\protobuf.git\src\google\protobuf\map_field.cc(467): warning C4506: no definition for inline function 'void *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetMaybeArenaPointer(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
          with
          [
              GenericType=google::protobuf::Message
          ]
  message.cc
  reflection_ops.cc
  service.cc
  source_context.pb.cc
  struct.pb.cc
  mathlimits.cc
  substitute.cc
  text_format.cc
  timestamp.pb.cc
  type.pb.cc
  unknown_field_set.cc
  field_comparator.cc
  field_mask_util.cc
  datapiece.cc
  default_value_objectwriter.cc
  error_listener.cc
  field_mask_utility.cc
  Generating Code...
d:\dev\protobuf\protobuf.git\src\google\protobuf\map.h(855): warning C4715: 'google::protobuf::hash<google::protobuf::MapKey>::operator()': not all control paths return a value [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
d:\dev\protobuf\protobuf.git\src\google\protobuf\map.h(193): warning C4715: 'google::protobuf::MapKey::operator==': not all control paths return a value [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  Compiling...
  json_escaping.cc
  json_objectwriter.cc
  json_stream_parser.cc
  object_writer.cc
  protostream_objectsource.cc
  protostream_objectwriter.cc
  type_info.cc
  type_info_test_helper.cc
  utility.cc
  json_util.cc
  message_differencer.cc
  time_util.cc
  type_resolver_util.cc
  wire_format.cc
  wrappers.pb.cc
  Generating Code...
Lib:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\Lib.exe /OUT:"D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf.lib" /NOLOGO /MACHINE:X64 libprotobuf.dir\Release\arena.obj
  libprotobuf.dir\Release\arenastring.obj
  libprotobuf.dir\Release\extension_set.obj
  libprotobuf.dir\Release\generated_message_util.obj
  libprotobuf.dir\Release\coded_stream.obj
  libprotobuf.dir\Release\zero_copy_stream.obj
  libprotobuf.dir\Release\zero_copy_stream_impl_lite.obj
  libprotobuf.dir\Release\message_lite.obj
  libprotobuf.dir\Release\repeated_field.obj
  libprotobuf.dir\Release\atomicops_internals_x86_gcc.obj
  libprotobuf.dir\Release\atomicops_internals_x86_msvc.obj
  libprotobuf.dir\Release\bytestream.obj
  libprotobuf.dir\Release\common.obj
  libprotobuf.dir\Release\int128.obj
  libprotobuf.dir\Release\once.obj
  libprotobuf.dir\Release\status.obj
  libprotobuf.dir\Release\statusor.obj
  libprotobuf.dir\Release\stringpiece.obj
  libprotobuf.dir\Release\stringprintf.obj
  libprotobuf.dir\Release\structurally_valid.obj
  libprotobuf.dir\Release\strutil.obj
  libprotobuf.dir\Release\time.obj
  libprotobuf.dir\Release\wire_format_lite.obj
  libprotobuf.dir\Release\any.obj
  libprotobuf.dir\Release\any.pb.obj
  libprotobuf.dir\Release\api.pb.obj
  libprotobuf.dir\Release\importer.obj
  libprotobuf.dir\Release\parser.obj
  libprotobuf.dir\Release\descriptor.obj
  libprotobuf.dir\Release\descriptor.pb.obj
  libprotobuf.dir\Release\descriptor_database.obj
  libprotobuf.dir\Release\duration.pb.obj
  libprotobuf.dir\Release\dynamic_message.obj
  libprotobuf.dir\Release\empty.pb.obj
  libprotobuf.dir\Release\extension_set_heavy.obj
  libprotobuf.dir\Release\field_mask.pb.obj
  libprotobuf.dir\Release\generated_message_reflection.obj
  libprotobuf.dir\Release\gzip_stream.obj
  libprotobuf.dir\Release\printer.obj
  libprotobuf.dir\Release\strtod.obj
  libprotobuf.dir\Release\tokenizer.obj
  libprotobuf.dir\Release\zero_copy_stream_impl.obj
  libprotobuf.dir\Release\map_field.obj
  libprotobuf.dir\Release\message.obj
  libprotobuf.dir\Release\reflection_ops.obj
  libprotobuf.dir\Release\service.obj
  libprotobuf.dir\Release\source_context.pb.obj
  libprotobuf.dir\Release\struct.pb.obj
  libprotobuf.dir\Release\mathlimits.obj
  libprotobuf.dir\Release\substitute.obj
  libprotobuf.dir\Release\text_format.obj
  libprotobuf.dir\Release\timestamp.pb.obj
  libprotobuf.dir\Release\type.pb.obj
  libprotobuf.dir\Release\unknown_field_set.obj
  libprotobuf.dir\Release\field_comparator.obj
  libprotobuf.dir\Release\field_mask_util.obj
  libprotobuf.dir\Release\datapiece.obj
  libprotobuf.dir\Release\default_value_objectwriter.obj
  libprotobuf.dir\Release\error_listener.obj
  libprotobuf.dir\Release\field_mask_utility.obj
  libprotobuf.dir\Release\json_escaping.obj
  libprotobuf.dir\Release\json_objectwriter.obj
  libprotobuf.dir\Release\json_stream_parser.obj
  libprotobuf.dir\Release\object_writer.obj
  libprotobuf.dir\Release\protostream_objectsource.obj
  libprotobuf.dir\Release\protostream_objectwriter.obj
  libprotobuf.dir\Release\type_info.obj
  libprotobuf.dir\Release\type_info_test_helper.obj
  libprotobuf.dir\Release\utility.obj
  libprotobuf.dir\Release\json_util.obj
  libprotobuf.dir\Release\message_differencer.obj
  libprotobuf.dir\Release\time_util.obj
  libprotobuf.dir\Release\type_resolver_util.obj
  libprotobuf.dir\Release\wire_format.obj
  libprotobuf.dir\Release\wrappers.pb.obj
  libprotobuf.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf.lib
FinalizeBuildStatus:
  Deleting file "libprotobuf.dir\Release\libprotobuf.tlog\unsuccessfulbuild".
  Touching "libprotobuf.dir\Release\libprotobuf.tlog\libprotobuf.lastbuildstate".
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj" (default targets).
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj.metaproj" (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf-lite.vcxproj.metaproj" (6) on node 1 (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf-lite.vcxproj.metaproj" (6) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf-lite.vcxproj" (7) on node 1 (default targets).
PrepareForBuild:
  Creating directory "libprotobuf-lite.dir\Release\".
  Creating directory "libprotobuf-lite.dir\Release\libprotobuf-lite.tlog\".
InitializeBuildStatus:
  Creating "libprotobuf-lite.dir\Release\libprotobuf-lite.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe /c /ID:\dev\protobuf\protobuf.git\cmake\_build /ID:\dev\protobuf\protobuf.git\src /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D LIBPROTOBUF_EXPORTS /D GOOGLE_PROTOBUF_CMAKE_BUILD /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"libprotobuf-lite.dir\Release\\" /Fd"libprotobuf-lite.dir\Release\libprotobuf-lite.pdb" /Gd /TP /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /errorReport:queue D:\dev\protobuf\protobuf.git\src\google\protobuf\arena.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\arenastring.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\extension_set.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_util.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\coded_stream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\zero_copy_stream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\io\zero_copy_stream_impl_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\message_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\repeated_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\atomicops_internals_x86_gcc.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\atomicops_internals_x86_msvc.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\bytestream.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\common.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\int128.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\once.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\status.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\statusor.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\stringpiece.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\stringprintf.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\structurally_valid.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\strutil.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\stubs\time.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\wire_format_lite.cc
  arena.cc
  arenastring.cc
  extension_set.cc
  generated_message_util.cc
  coded_stream.cc
  zero_copy_stream.cc
  zero_copy_stream_impl_lite.cc
  message_lite.cc
  repeated_field.cc
  atomicops_internals_x86_gcc.cc
  atomicops_internals_x86_msvc.cc
  bytestream.cc
  common.cc
  int128.cc
  once.cc
  status.cc
  statusor.cc
  stringpiece.cc
  stringprintf.cc
  structurally_valid.cc
  Generating Code...
  Compiling...
  strutil.cc
  time.cc
  wire_format_lite.cc
  Generating Code...
Lib:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\Lib.exe /OUT:"D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf-lite.lib" /NOLOGO /MACHINE:X64 "libprotobuf-lite.dir\Release\arena.obj"
  "libprotobuf-lite.dir\Release\arenastring.obj"
  "libprotobuf-lite.dir\Release\extension_set.obj"
  "libprotobuf-lite.dir\Release\generated_message_util.obj"
  "libprotobuf-lite.dir\Release\coded_stream.obj"
  "libprotobuf-lite.dir\Release\zero_copy_stream.obj"
  "libprotobuf-lite.dir\Release\zero_copy_stream_impl_lite.obj"
  "libprotobuf-lite.dir\Release\message_lite.obj"
  "libprotobuf-lite.dir\Release\repeated_field.obj"
  "libprotobuf-lite.dir\Release\atomicops_internals_x86_gcc.obj"
  "libprotobuf-lite.dir\Release\atomicops_internals_x86_msvc.obj"
  "libprotobuf-lite.dir\Release\bytestream.obj"
  "libprotobuf-lite.dir\Release\common.obj"
  "libprotobuf-lite.dir\Release\int128.obj"
  "libprotobuf-lite.dir\Release\once.obj"
  "libprotobuf-lite.dir\Release\status.obj"
  "libprotobuf-lite.dir\Release\statusor.obj"
  "libprotobuf-lite.dir\Release\stringpiece.obj"
  "libprotobuf-lite.dir\Release\stringprintf.obj"
  "libprotobuf-lite.dir\Release\structurally_valid.obj"
  "libprotobuf-lite.dir\Release\strutil.obj"
  "libprotobuf-lite.dir\Release\time.obj"
  "libprotobuf-lite.dir\Release\wire_format_lite.obj"
  libprotobuf-lite.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotobuf-lite.lib
FinalizeBuildStatus:
  Deleting file "libprotobuf-lite.dir\Release\libprotobuf-lite.tlog\unsuccessfulbuild".
  Touching "libprotobuf-lite.dir\Release\libprotobuf-lite.tlog\libprotobuf-lite.lastbuildstate".
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf-lite.vcxproj" (default targets).
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf-lite.vcxproj.metaproj" (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotoc.vcxproj.metaproj" (8) on node 1 (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotoc.vcxproj.metaproj" (8) is building "D:\dev\protobuf\protobuf.git\cmake\_build\libprotoc.vcxproj" (9) on node 1 (default targets).
PrepareForBuild:
  Creating directory "libprotoc.dir\Release\".
  Creating directory "libprotoc.dir\Release\libprotoc.tlog\".
InitializeBuildStatus:
  Creating "libprotoc.dir\Release\libprotoc.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe /c /ID:\dev\protobuf\protobuf.git\cmake\_build /ID:\dev\protobuf\protobuf.git\src /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D LIBPROTOC_EXPORTS /D GOOGLE_PROTOBUF_CMAKE_BUILD /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"libprotoc.dir\Release\\" /Fd"libprotoc.dir\Release\libprotoc.pdb" /Gd /TP /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /errorReport:queue D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\code_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\command_line_interface.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_enum.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_extension.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_file.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_helpers.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_service.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\cpp\cpp_string_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_enum.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_field_base.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_helpers.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_repeated_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_repeated_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_repeated_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_source_generator_base.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_umbrella_class.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\csharp\csharp_wrapper_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_context.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_doc_comment.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_enum.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_enum_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_enum_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_extension.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_file.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_generator_factory.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_helpers.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_lazy_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_lazy_message_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_map_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message_builder.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message_builder_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_message_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_name_resolver.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_primitive_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_service.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_shared_code_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_string_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\java\java_string_field_lite.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_enum.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_extension.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_file.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_helpers.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\javanano\javanano_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_enum.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_enum_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_extension.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_file.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_helpers.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_map_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_message.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_message_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_oneof.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\objectivec\objectivec_primitive_field.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\plugin.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\plugin.pb.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\python\python_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\ruby\ruby_generator.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\subprocess.cc D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\zip_writer.cc
  code_generator.cc
  command_line_interface.cc
  cpp_enum.cc
  cpp_enum_field.cc
  cpp_extension.cc
  cpp_field.cc
  cpp_file.cc
  cpp_generator.cc
  cpp_helpers.cc
  cpp_map_field.cc
  cpp_message.cc
  cpp_message_field.cc
  cpp_primitive_field.cc
  cpp_service.cc
  cpp_string_field.cc
  csharp_enum.cc
  csharp_enum_field.cc
  csharp_field_base.cc
  csharp_generator.cc
  csharp_helpers.cc
  Generating Code...
  Compiling...
  csharp_map_field.cc
  csharp_message.cc
  csharp_message_field.cc
  csharp_primitive_field.cc
  csharp_repeated_enum_field.cc
  csharp_repeated_message_field.cc
  csharp_repeated_primitive_field.cc
  csharp_source_generator_base.cc
  csharp_umbrella_class.cc
  csharp_wrapper_field.cc
  java_context.cc
  java_doc_comment.cc
  java_enum.cc
  java_enum_field.cc
  java_enum_field_lite.cc
  java_enum_lite.cc
  java_extension.cc
  java_field.cc
  java_file.cc
  java_generator.cc
  Generating Code...
  Compiling...
  java_generator_factory.cc
  java_helpers.cc
  java_lazy_message_field.cc
  java_lazy_message_field_lite.cc
  java_map_field.cc
  java_map_field_lite.cc
  java_message.cc
  java_message_builder.cc
  java_message_builder_lite.cc
  java_message_field.cc
  java_message_field_lite.cc
  java_message_lite.cc
  java_name_resolver.cc
  java_primitive_field.cc
  java_primitive_field_lite.cc
  java_service.cc
  java_shared_code_generator.cc
  java_string_field.cc
  java_string_field_lite.cc
  javanano_enum.cc
  Generating Code...
  Compiling...
  javanano_enum_field.cc
  javanano_extension.cc
  javanano_field.cc
  javanano_file.cc
  javanano_generator.cc
  javanano_helpers.cc
  javanano_map_field.cc
  javanano_message.cc
  javanano_message_field.cc
  javanano_primitive_field.cc
  objectivec_enum.cc
  objectivec_enum_field.cc
  objectivec_extension.cc
  objectivec_field.cc
  objectivec_file.cc
  objectivec_generator.cc
  objectivec_helpers.cc
  objectivec_map_field.cc
  objectivec_message.cc
  objectivec_message_field.cc
  Generating Code...
  Compiling...
  objectivec_oneof.cc
  objectivec_primitive_field.cc
  plugin.cc
  plugin.pb.cc
  python_generator.cc
  ruby_generator.cc
  subprocess.cc
  zip_writer.cc
  Generating Code...
Lib:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\Lib.exe /OUT:"D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotoc.lib" /NOLOGO /MACHINE:X64 libprotoc.dir\Release\code_generator.obj
  libprotoc.dir\Release\command_line_interface.obj
  libprotoc.dir\Release\cpp_enum.obj
  libprotoc.dir\Release\cpp_enum_field.obj
  libprotoc.dir\Release\cpp_extension.obj
  libprotoc.dir\Release\cpp_field.obj
  libprotoc.dir\Release\cpp_file.obj
  libprotoc.dir\Release\cpp_generator.obj
  libprotoc.dir\Release\cpp_helpers.obj
  libprotoc.dir\Release\cpp_map_field.obj
  libprotoc.dir\Release\cpp_message.obj
  libprotoc.dir\Release\cpp_message_field.obj
  libprotoc.dir\Release\cpp_primitive_field.obj
  libprotoc.dir\Release\cpp_service.obj
  libprotoc.dir\Release\cpp_string_field.obj
  libprotoc.dir\Release\csharp_enum.obj
  libprotoc.dir\Release\csharp_enum_field.obj
  libprotoc.dir\Release\csharp_field_base.obj
  libprotoc.dir\Release\csharp_generator.obj
  libprotoc.dir\Release\csharp_helpers.obj
  libprotoc.dir\Release\csharp_map_field.obj
  libprotoc.dir\Release\csharp_message.obj
  libprotoc.dir\Release\csharp_message_field.obj
  libprotoc.dir\Release\csharp_primitive_field.obj
  libprotoc.dir\Release\csharp_repeated_enum_field.obj
  libprotoc.dir\Release\csharp_repeated_message_field.obj
  libprotoc.dir\Release\csharp_repeated_primitive_field.obj
  libprotoc.dir\Release\csharp_source_generator_base.obj
  libprotoc.dir\Release\csharp_umbrella_class.obj
  libprotoc.dir\Release\csharp_wrapper_field.obj
  libprotoc.dir\Release\java_context.obj
  libprotoc.dir\Release\java_doc_comment.obj
  libprotoc.dir\Release\java_enum.obj
  libprotoc.dir\Release\java_enum_field.obj
  libprotoc.dir\Release\java_enum_field_lite.obj
  libprotoc.dir\Release\java_enum_lite.obj
  libprotoc.dir\Release\java_extension.obj
  libprotoc.dir\Release\java_field.obj
  libprotoc.dir\Release\java_file.obj
  libprotoc.dir\Release\java_generator.obj
  libprotoc.dir\Release\java_generator_factory.obj
  libprotoc.dir\Release\java_helpers.obj
  libprotoc.dir\Release\java_lazy_message_field.obj
  libprotoc.dir\Release\java_lazy_message_field_lite.obj
  libprotoc.dir\Release\java_map_field.obj
  libprotoc.dir\Release\java_map_field_lite.obj
  libprotoc.dir\Release\java_message.obj
  libprotoc.dir\Release\java_message_builder.obj
  libprotoc.dir\Release\java_message_builder_lite.obj
  libprotoc.dir\Release\java_message_field.obj
  libprotoc.dir\Release\java_message_field_lite.obj
  libprotoc.dir\Release\java_message_lite.obj
  libprotoc.dir\Release\java_name_resolver.obj
  libprotoc.dir\Release\java_primitive_field.obj
  libprotoc.dir\Release\java_primitive_field_lite.obj
  libprotoc.dir\Release\java_service.obj
  libprotoc.dir\Release\java_shared_code_generator.obj
  libprotoc.dir\Release\java_string_field.obj
  libprotoc.dir\Release\java_string_field_lite.obj
  libprotoc.dir\Release\javanano_enum.obj
  libprotoc.dir\Release\javanano_enum_field.obj
  libprotoc.dir\Release\javanano_extension.obj
  libprotoc.dir\Release\javanano_field.obj
  libprotoc.dir\Release\javanano_file.obj
  libprotoc.dir\Release\javanano_generator.obj
  libprotoc.dir\Release\javanano_helpers.obj
  libprotoc.dir\Release\javanano_map_field.obj
  libprotoc.dir\Release\javanano_message.obj
  libprotoc.dir\Release\javanano_message_field.obj
  libprotoc.dir\Release\javanano_primitive_field.obj
  libprotoc.dir\Release\objectivec_enum.obj
  libprotoc.dir\Release\objectivec_enum_field.obj
  libprotoc.dir\Release\objectivec_extension.obj
  libprotoc.dir\Release\objectivec_field.obj
  libprotoc.dir\Release\objectivec_file.obj
  libprotoc.dir\Release\objectivec_generator.obj
  libprotoc.dir\Release\objectivec_helpers.obj
  libprotoc.dir\Release\objectivec_map_field.obj
  libprotoc.dir\Release\objectivec_message.obj
  libprotoc.dir\Release\objectivec_message_field.obj
  libprotoc.dir\Release\objectivec_oneof.obj
  libprotoc.dir\Release\objectivec_primitive_field.obj
  libprotoc.dir\Release\plugin.obj
  libprotoc.dir\Release\plugin.pb.obj
  libprotoc.dir\Release\python_generator.obj
  libprotoc.dir\Release\ruby_generator.obj
  libprotoc.dir\Release\subprocess.obj
  libprotoc.dir\Release\zip_writer.obj
  libprotoc.vcxproj -> D:\dev\protobuf\protobuf.git\cmake\_build\Release\libprotoc.lib
FinalizeBuildStatus:
  Deleting file "libprotoc.dir\Release\libprotoc.tlog\unsuccessfulbuild".
  Touching "libprotoc.dir\Release\libprotoc.tlog\libprotoc.lastbuildstate".
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotoc.vcxproj" (default targets).
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\libprotoc.vcxproj.metaproj" (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (2) is building "D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj.metaproj" (10) on node 1 (default targets).
Project "D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj.metaproj" (10) is building "D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj" (11) on node 1 (default targets).
PrepareForBuild:
  Creating directory "protoc.dir\Release\".
  Creating directory "protoc.dir\Release\protoc.tlog\".
InitializeBuildStatus:
  Creating "protoc.dir\Release\protoc.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
  Building Custom Rule D:/dev/protobuf/protobuf.git/cmake/CMakeLists.txt
  CMake does not need to re-run because D:\dev\protobuf\protobuf.git\cmake\_build\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\CL.exe /c /ID:\dev\protobuf\protobuf.git\cmake\_build /ID:\dev\protobuf\protobuf.git\src /nologo /W3 /WX- /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D GOOGLE_PROTOBUF_CMAKE_BUILD /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MT /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"protoc.dir\Release\\" /Fd"protoc.dir\Release\vc140.pdb" /Gd /TP /wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305 /errorReport:queue D:\dev\protobuf\protobuf.git\src\google\protobuf\compiler\main.cc
  main.cc
Link:
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\dev\protobuf\protobuf.git\cmake\_build\Release\protoc.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib Release\libprotobuf.lib Release\libprotoc.lib Release\libprotobuf.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"D:/dev/protobuf/protobuf.git/cmake/_build/Release/protoc.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/dev/protobuf/protobuf.git/cmake/_build/Release/protoc.lib" /MACHINE:X64  /machine:x64 protoc.dir\Release\main.obj
libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Arena * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetArena(class google::protobuf::Message *)" (?GetArena@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAVArena@34@PEAVMessage@34@@Z) referenced in function "protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(class google::protobuf::Message *,struct google::protobuf::internal::integral_constant<bool,1>)" (??$AddAllocatedInternal@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXPEAVMessage@23@U?$integral_constant@_N$00@123@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
libprotobuf.lib(map_field.obj) : error LNK2001: unresolved external symbol "public: static class google::protobuf::Arena * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetArena(class google::protobuf::Message *)" (?GetArena@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAVArena@34@PEAVMessage@34@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static void * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetMaybeArenaPointer(class google::protobuf::Message *)" (?GetMaybeArenaPointer@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAXPEAVMessage@34@@Z) referenced in function "protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(class google::protobuf::Message *,struct google::protobuf::internal::integral_constant<bool,1>)" (??$AddAllocatedInternal@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXPEAVMessage@23@U?$integral_constant@_N$00@123@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
libprotobuf.lib(map_field.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetMaybeArenaPointer(class google::protobuf::Message *)" (?GetMaybeArenaPointer@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAXPEAVMessage@34@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
D:\dev\protobuf\protobuf.git\cmake\_build\Release\protoc.exe : fatal error LNK1120: 2 unresolved externals [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj" (default targets) -- FAILED.
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj.metaproj" (default targets) -- FAILED.
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (default targets) -- FAILED.
Done Building Project "D:\dev\protobuf\protobuf.git\cmake\_build\protobuf.sln" (default targets) -- FAILED.

Build FAILED.

"D:\dev\protobuf\protobuf.git\cmake\_build\protobuf.sln" (default target) (1) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj.metaproj" (default target) (4) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj" (default target) (5) ->
(ClCompile target) -> 
  D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc(2276): warning C4506: no definition for inline function 'google::protobuf::Arena *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetArena(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  D:\dev\protobuf\protobuf.git\src\google\protobuf\generated_message_reflection.cc(2276): warning C4506: no definition for inline function 'void *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetMaybeArenaPointer(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  D:\dev\protobuf\protobuf.git\src\google\protobuf\map_field.cc(467): warning C4506: no definition for inline function 'google::protobuf::Arena *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetArena(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  D:\dev\protobuf\protobuf.git\src\google\protobuf\map_field.cc(467): warning C4506: no definition for inline function 'void *google::protobuf::internal::GenericTypeHandler<google::protobuf::Message>::GetMaybeArenaPointer(GenericType *)' [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  d:\dev\protobuf\protobuf.git\src\google\protobuf\map.h(855): warning C4715: 'google::protobuf::hash<google::protobuf::MapKey>::operator()': not all control paths return a value [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]
  d:\dev\protobuf\protobuf.git\src\google\protobuf\map.h(193): warning C4715: 'google::protobuf::MapKey::operator==': not all control paths return a value [D:\dev\protobuf\protobuf.git\cmake\_build\libprotobuf.vcxproj]


"D:\dev\protobuf\protobuf.git\cmake\_build\protobuf.sln" (default target) (1) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\ALL_BUILD.vcxproj.metaproj" (default target) (2) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj.metaproj" (default target) (10) ->
"D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj" (default target) (11) ->
(Link target) -> 
  libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static class google::protobuf::Arena * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetArena(class google::protobuf::Message *)" (?GetArena@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAVArena@34@PEAVMessage@34@@Z) referenced in function "protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(class google::protobuf::Message *,struct google::protobuf::internal::integral_constant<bool,1>)" (??$AddAllocatedInternal@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXPEAVMessage@23@U?$integral_constant@_N$00@123@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
  libprotobuf.lib(map_field.obj) : error LNK2001: unresolved external symbol "public: static class google::protobuf::Arena * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetArena(class google::protobuf::Message *)" (?GetArena@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAVArena@34@PEAVMessage@34@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
  libprotobuf.lib(generated_message_reflection.obj) : error LNK2019: unresolved external symbol "public: static void * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetMaybeArenaPointer(class google::protobuf::Message *)" (?GetMaybeArenaPointer@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAXPEAVMessage@34@@Z) referenced in function "protected: void __cdecl google::protobuf::internal::RepeatedPtrFieldBase::AddAllocatedInternal<class google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message> >(class google::protobuf::Message *,struct google::protobuf::internal::integral_constant<bool,1>)" (??$AddAllocatedInternal@V?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@@RepeatedPtrFieldBase@internal@protobuf@google@@IEAAXPEAVMessage@23@U?$integral_constant@_N$00@123@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
  libprotobuf.lib(map_field.obj) : error LNK2001: unresolved external symbol "public: static void * __cdecl google::protobuf::internal::GenericTypeHandler<class google::protobuf::Message>::GetMaybeArenaPointer(class google::protobuf::Message *)" (?GetMaybeArenaPointer@?$GenericTypeHandler@VMessage@protobuf@google@@@internal@protobuf@google@@SAPEAXPEAVMessage@34@@Z) [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]
  D:\dev\protobuf\protobuf.git\cmake\_build\Release\protoc.exe : fatal error LNK1120: 2 unresolved externals [D:\dev\protobuf\protobuf.git\cmake\_build\protoc.vcxproj]

    6 Warning(s)
    5 Error(s)

Time Elapsed 00:02:32.50

So, CMake patch in #717 still remains as the working solution for me.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Sep 14, 2015

@0xAAE could you help send us a pull request? The change you mentioned seems to be what's missing from @DouglasHeriot's original pull request #726

@0xAAE
Copy link
Contributor

0xAAE commented Sep 14, 2015

Certainly, I'll send. Please, explain me briefly how can I do it. Also, notice that only release build produce the errors, debug one is OK

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Sep 14, 2015

Thanks. You can follow the generate instructions on how to send pull requests:
https://help.github.com/articles/using-pull-requests/

Basically you first fork a protobuf branch under your github account, push your changes there, and create a pull request (a few simple clicks) to merge your branch to protobuf master branch.

@0xAAE
Copy link
Contributor

0xAAE commented Sep 14, 2015

Ok, I'll post here when finish

@0xAAE
Copy link
Contributor

0xAAE commented Sep 14, 2015

I've just done pull request #813

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Sep 16, 2015

I believe this issue is fixed now (thanks @DouglasHeriot and @0xAAE ).

@xfxyjwf xfxyjwf closed this as completed Sep 16, 2015
smanders pushed a commit to smanders/externpro that referenced this issue Feb 9, 2016
* protocolbuffers/protobuf#240
* protocolbuffers/protobuf#813
* Add GOOGLE_ATTRIBUTE_NOINLINE to GetArena() and GetMaybeArenaPointer() methods.
* This is to avoid "unresolved link" errors in MSVC 2015 during Release build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests