Status: New
Labels: Type-Defect Priority-Medium

New issue 291 by PluginMain is not exported in DLL version

What steps will reproduce the problem?
1. Compile protoc & protobuf with PROTOBUF_USE_DLLS
2. Try to write protoc-plugin (like this one 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?

Please provide any additional information below.
Just add LIBPROTOC_EXPORT to signature of PluginMain in

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