{"action":"created","issue":{"url":"https://api.github.com/repos/google/protobuf/issues/240","labels_url":"https://api.github.com/repos/google/protobuf/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf/issues/240/comments","events_url":"https://api.github.com/repos/google/protobuf/issues/240/events","html_url":"https://github.com/google/protobuf/issues/240","id":61010551,"number":240,"title":"unresolved external symbol when compile protoc with vs2015CTP in release mode (protobuf-3.0.0-alpha-2)","user":{"login":"toddwong","id":8896530,"avatar_url":"https://avatars.githubusercontent.com/u/8896530?v=3","gravatar_id":"","url":"https://api.github.com/users/toddwong","html_url":"https://github.com/toddwong","followers_url":"https://api.github.com/users/toddwong/followers","following_url":"https://api.github.com/users/toddwong/following{/other_user}","gists_url":"https://api.github.com/users/toddwong/gists{/gist_id}","starred_url":"https://api.github.com/users/toddwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddwong/subscriptions","organizations_url":"https://api.github.com/users/toddwong/orgs","repos_url":"https://api.github.com/users/toddwong/repos","events_url":"https://api.github.com/users/toddwong/events{/privacy}","received_events_url":"https://api.github.com/users/toddwong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-03-13T08:16:07Z","updated_at":"2015-07-11T07:22:40Z","closed_at":null,"body":"The following error reported:\r\n```\r\nlibprotobuf.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)\r\n```\r\n\r\nAnd a suspicious warning:\r\n```\r\n..\\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 *)'\r\n          with\r\n          [\r\n              GenericType=google::protobuf::Message\r\n          ]\r\n```\r\n\r\nThe full output:\r\n```\r\n1>------ Build started: Project: libprotobuf, Configuration: Release Win32 ------\r\n1>  arena.cc\r\n1>  arenastring.cc\r\n1>  importer.cc\r\n1>  parser.cc\r\n1>  descriptor.cc\r\n1>  descriptor.pb.cc\r\n1>  descriptor_database.cc\r\n1>  dynamic_message.cc\r\n1>  extension_set.cc\r\n1>  extension_set_heavy.cc\r\n1>  generated_message_reflection.cc\r\n1>..\\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 *)'\r\n1>          with\r\n1>          [\r\n1>              GenericType=google::protobuf::Message\r\n1>          ]\r\n1>  generated_message_util.cc\r\n1>  coded_stream.cc\r\n1>  gzip_stream.cc\r\n1>  printer.cc\r\n1>  strtod.cc\r\n1>  tokenizer.cc\r\n1>  zero_copy_stream.cc\r\n1>  zero_copy_stream_impl.cc\r\n1>  zero_copy_stream_impl_lite.cc\r\n1>  Generating Code...\r\n1>  Compiling...\r\n1>  map_field.cc\r\n1>  message.cc\r\n1>  message_lite.cc\r\n1>  reflection_ops.cc\r\n1>  repeated_field.cc\r\n1>  service.cc\r\n1>  atomicops_internals_x86_gcc.cc\r\n1>  atomicops_internals_x86_msvc.cc\r\n1>  common.cc\r\n1>  once.cc\r\n1>  stringprintf.cc\r\n1>  structurally_valid.cc\r\n1>  strutil.cc\r\n1>..\\src\\google\\protobuf\\stubs\\strutil.cc(1229): warning C4456: declaration of 'snprintf_result' hides previous local declaration\r\n1>  ..\\src\\google\\protobuf\\stubs\\strutil.cc(1213): note: see declaration of 'snprintf_result'\r\n1>..\\src\\google\\protobuf\\stubs\\strutil.cc(1278): warning C4456: declaration of 'snprintf_result' hides previous local declaration\r\n1>  ..\\src\\google\\protobuf\\stubs\\strutil.cc(1268): note: see declaration of 'snprintf_result'\r\n1>  substitute.cc\r\n1>  text_format.cc\r\n1>  unknown_field_set.cc\r\n1>  wire_format.cc\r\n1>  wire_format_lite.cc\r\n1>  Generating Code...\r\n1>  libprotobuf.vcxproj -> D:\\protobuf-3.0.0-alpha-2\\vsprojects\\Release\\libprotobuf.lib\r\n2>------ Build started: Project: libprotoc, Configuration: Release Win32 ------\r\n2>  code_generator.cc\r\n2>  command_line_interface.cc\r\n2>  cpp_enum.cc\r\n2>  cpp_enum_field.cc\r\n2>  cpp_extension.cc\r\n2>  cpp_field.cc\r\n2>  cpp_file.cc\r\n2>  cpp_generator.cc\r\n2>  cpp_helpers.cc\r\n2>  cpp_map_field.cc\r\n2>  cpp_message.cc\r\n2>  cpp_message_field.cc\r\n2>  cpp_primitive_field.cc\r\n2>  cpp_service.cc\r\n2>  cpp_string_field.cc\r\n2>  javanano_enum.cc\r\n2>  javanano_enum_field.cc\r\n2>  javanano_extension.cc\r\n2>  javanano_field.cc\r\n2>  javanano_file.cc\r\n2>  Generating Code...\r\n2>  Compiling...\r\n2>  javanano_generator.cc\r\n2>  javanano_helpers.cc\r\n2>  javanano_map_field.cc\r\n2>  javanano_message.cc\r\n2>  javanano_message_field.cc\r\n2>  javanano_primitive_field.cc\r\n2>  java_context.cc\r\n2>  java_doc_comment.cc\r\n2>  java_enum.cc\r\n2>  java_enum_field.cc\r\n2>  java_extension.cc\r\n2>  java_field.cc\r\n2>  java_file.cc\r\n2>  java_generator.cc\r\n2>  java_generator_factory.cc\r\n2>  java_helpers.cc\r\n2>  java_lazy_message_field.cc\r\n2>  java_map_field.cc\r\n2>  java_message.cc\r\n2>  java_message_field.cc\r\n2>  Generating Code...\r\n2>  Compiling...\r\n2>  java_name_resolver.cc\r\n2>  java_primitive_field.cc\r\n2>  java_service.cc\r\n2>  java_shared_code_generator.cc\r\n2>  java_string_field.cc\r\n2>  plugin.cc\r\n2>  plugin.pb.cc\r\n2>  python_generator.cc\r\n2>..\\src\\google\\protobuf\\compiler\\python\\python_generator.cc(705): warning C4456: declaration of 'm' hides previous local declaration\r\n2>  ..\\src\\google\\protobuf\\compiler\\python\\python_generator.cc(645): note: see declaration of 'm'\r\n2>  ruby_generator.cc\r\n2>  subprocess.cc\r\n2>  zip_writer.cc\r\n2>  Generating Code...\r\n2>  libprotoc.vcxproj -> D:\\protobuf-3.0.0-alpha-2\\vsprojects\\Release\\libprotoc.lib\r\n3>------ Build started: Project: protoc, Configuration: Release Win32 ------\r\n3>  main.cc\r\n3>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification\r\n3>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)\r\n3>Release\\protoc.exe : fatal error LNK1120: 1 unresolved externals\r\n========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========\r\n```\r\n\r\nAny suggestion or workaround will be appreciated."},"comment":{"url":"https://api.github.com/repos/google/protobuf/issues/comments/120589342","html_url":"https://github.com/google/protobuf/issues/240#issuecomment-120589342","issue_url":"https://api.github.com/repos/google/protobuf/issues/240","id":120589342,"user":{"login":"amirrony","id":7962604,"avatar_url":"https://avatars.githubusercontent.com/u/7962604?v=3","gravatar_id":"","url":"https://api.github.com/users/amirrony","html_url":"https://github.com/amirrony","followers_url":"https://api.github.com/users/amirrony/followers","following_url":"https://api.github.com/users/amirrony/following{/other_user}","gists_url":"https://api.github.com/users/amirrony/gists{/gist_id}","starred_url":"https://api.github.com/users/amirrony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amirrony/subscriptions","organizations_url":"https://api.github.com/users/amirrony/orgs","repos_url":"https://api.github.com/users/amirrony/repos","events_url":"https://api.github.com/users/amirrony/events{/privacy}","received_events_url":"https://api.github.com/users/amirrony/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T07:22:40Z","updated_at":"2015-07-11T07:22:40Z","body":"Hey,\r\n\r\nAny fix or workaround for this problem?\r\n\r\nHow can I solve it for creating a release binary in VS 2015 (community)"}}