mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-29 23:42:12 +08:00
5f122c44e0
PACKAGE_STRING provided by autotools (fixes #52)
18 lines
476 B
C++
18 lines
476 B
C++
#include <google/protobuf/compiler/command_line_interface.h>
|
|
#include <protoc-c/c_generator.h>
|
|
|
|
|
|
int main(int argc, char* argv[]) {
|
|
google::protobuf::compiler::CommandLineInterface cli;
|
|
|
|
// Support generation of Foo code.
|
|
google::protobuf::compiler::c::CGenerator c_generator;
|
|
cli.RegisterGenerator("--c_out", &c_generator,
|
|
"Generate C/H files.");
|
|
|
|
// Add version info generated by automake
|
|
cli.SetVersionInfo(PACKAGE_STRING);
|
|
|
|
return cli.Run(argc, argv);
|
|
}
|