Status: New
Labels: Type-Defect Priority-Medium

New issue 308 by unresolved external symbol kEmptyString when linking protobuf as a dll.

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.

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to