Comment #4 on issue 308 by unresolved external symbol kEmptyString when linking protobuf as a dll.


1. get the latest code from svn(20120928)
2. link protobuf as a dll
3. run the following code snippet

#include <stdio.h>
#include <google/protobuf/generated_message_util.h>

void main()
        ::std::string sts = ::google::protobuf::internal::kEmptyString;

build successful

error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const google::protobuf::internal::kEmptyString" (?kEmptyString@internal@protobuf@google@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@B)

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