mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 05:11:04 +08:00
protoc-c: fix shared lib build on windows
Fixes #458 Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
This commit is contained in:
parent
38af0d26ab
commit
2a278e0756
@ -68,6 +68,12 @@
|
||||
#include <string>
|
||||
#include <google/protobuf/compiler/code_generator.h>
|
||||
|
||||
#if defined(_WIN32) && defined(PROTOBUF_C_USE_SHARED_LIB)
|
||||
# define PROTOC_C_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
# define PROTOC_C_EXPORT
|
||||
#endif
|
||||
|
||||
namespace google {
|
||||
namespace protobuf {
|
||||
namespace compiler {
|
||||
@ -77,7 +83,7 @@ namespace c {
|
||||
// header. If you create your own protocol compiler binary and you want
|
||||
// it to support C++ output, you can do so by registering an instance of this
|
||||
// CodeGenerator with the CommandLineInterface in your main() function.
|
||||
class LIBPROTOC_EXPORT CGenerator : public CodeGenerator {
|
||||
class PROTOC_C_EXPORT CGenerator : public CodeGenerator {
|
||||
public:
|
||||
CGenerator();
|
||||
~CGenerator();
|
||||
|
Loading…
x
Reference in New Issue
Block a user