Received: by 10.52.178.103 with SMTP id cx7mr786259vdc.10.1309431136651; Thu, 30 Jun 2011 03:52:16 -0700 (PDT) X-BeenThere: protobuf@googlegroups.com Received: by 10.52.161.199 with SMTP id xu7ls1018007vdb.0.gmail; Thu, 30 Jun 2011 03:52:13 -0700 (PDT) Received: by 10.52.179.8 with SMTP id dc8mr790127vdc.14.1309431133495; Thu, 30 Jun 2011 03:52:13 -0700 (PDT) Received: by 10.52.179.8 with SMTP id dc8mr790126vdc.14.1309431133482; Thu, 30 Jun 2011 03:52:13 -0700 (PDT) Return-Path: <3XVUMTggOCK4dfchcPiTUccUZSQcRS.QcadfchcPiTUccUZSUfcidg....@codesite.bounces.google.com> Received: from mail-vx0-f204.google.com ([209.85.220.204]) by gmr-mx.google.com with ESMTPS id a10si1758870vdt.0.2011.06.30.03.52.13 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 03:52:13 -0700 (PDT) Received-SPF: pass (google.com: domain of 3XVUMTggOCK4dfchcPiTUccUZSQcRS.QcadfchcPiTUccUZSUfcidg....@codesite.bounces.google.com designates 209.85.220.204 as permitted sender) client-ip=209.85.220.204; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of 3XVUMTggOCK4dfchcPiTUccUZSQcRS.QcadfchcPiTUccUZSUfcidg....@codesite.bounces.google.com designates 209.85.220.204 as permitted sender) smtp.mail=3XVUMTggOCK4dfchcPiTUccUZSQcRS.QcadfchcPiTUccUZSUfcidg....@codesite.bounces.google.com Received: by vxk20 with SMTP id 20so370231vxk.3 for ; Thu, 30 Jun 2011 03:52:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.174.130 with SMTP id t2mr2078144qaz.4.1309431133246; Thu, 30 Jun 2011 03:52:13 -0700 (PDT) Reply-To: codesite-nore...@google.com X-Generated-By: Google Code X-GoogleCode-Project: protobuf X-GoogleCode-Issue-Id: 308 Message-ID: <0-13244680660385734572-14362633615889251106-protobuf=googlecode.com@googlecode.com> Date: Thu, 30 Jun 2011 10:52:13 +0000 Subject: Issue 308 in protobuf: unresolved external symbol kEmptyString when linking protobuf as a dll. From: proto...@googlecode.com To: protobuf@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Status: New Owner: liuj...@google.com Labels: Type-Defect Priority-Medium 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,class std::allocator > 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.