New issue 308 by 0902h...@gmail.com: unresolved external symbol
kEmptyString when linking protobuf as a dll.
http://code.google.com/p/protobuf/issues/detail?id=308
What steps will reproduce the problem?
1.compile protobuf 2.4.1 as a dll.
2.generate *.pb.h/cc with protoc.exe and add to the vs2008 project.
3.set include path and lib path, compile, link.
What is the expected output? What do you see instead?
expected: no errors.
actual: unresolved external symbol "class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const
google::protobuf::internal::kEmptyString"
What version of the product are you using? On what operating system?
2.4.1 on Windows 7.
Please provide any additional information below.
::google::protobuf::internal::kEmptyString is used in generated .cc files
and declared as "extern const ::std::string kEmptyString;" in
generated_message_util.h, but it is not exported.
Comment #1 on issue 308 by liuj...@google.com: unresolved external symbol
kEmptyString when linking protobuf as a dll.
http://code.google.com/p/protobuf/issues/detail?id=308
Could you please see the patch file to check if that fixes the issue?
Thanks.
Attachments:
export_empty_string.patch 461 bytes
Fixed in r401.