I have installed protobuf 3.5.1 using the "vcpkg" method on Windows. I can generate code, but when I try to compile I get many errors like:
1>f:\vcpkg\installed\x64-windows\include\google\protobuf\stubs\logging.h(100): warning C4251: 'google::protobuf::internal::LogMessage::message_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'google::protobuf::internal::LogMessage' 1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.14.26428\include\xstring(4347): note: see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' I can use std::string elsewhere in my code without this issue, so I suspect that I need to set some preprocessor flag(s) in my project? The Readme says "When compiling your project, make sure to #define PROTOBUF_USE_DLLS". However, doing so has no effect other than to report a duplicate macro definition warning. Thanks john -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
