Status: New
Owner: liuj...@google.com
Labels: Type-Defect Priority-Medium

New issue 291 by msome...@gmail.com: PluginMain is not exported in DLL version
http://code.google.com/p/protobuf/issues/detail?id=291

What steps will reproduce the problem?
1. Compile protoc & protobuf with PROTOBUF_USE_DLLS
2. Try to write protoc-plugin (like this one http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.compiler.plugin.html) and call google::protobuf::compiler::PluginMain()
Ofcourse link against protoc & protobuf
3. Try to link this program

What is the expected output?
Link successfull.

What do you see instead?
main.obj : error LNK2019: unresolved external symbol "int __cdecl google::protobuf::compiler::PluginMain(int,char * * const,class google::protobuf::compiler::CodeGenerator const *)" (?PluginMain@compiler@protobuf@google@@YAHHQAPADPBVCodeGenerator@123@@Z) referenced in function _main


What version of the product are you using? On what operating system?
2.4.1

Please provide any additional information below.
Just add LIBPROTOC_EXPORT to signature of PluginMain in
src\google\protobuf\compiler\plugin.h


--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to