博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
protocol buffer如何将输出文件编译为DLL
阅读量:4349 次
发布时间:2019-06-07

本文共 1194 字,大约阅读时间需要 3 分钟。

bool CppGenerator::Generate(const FileDescriptor* file,const string& parameter,GeneratorContext* generator_context,string* error) const {std::vector
> options;ParseGeneratorParameter(parameter, &options);// -----------------------------------------------------------------// parse generator options// TODO(kenton): If we ever have more options, we may want to create a// class that encapsulates them which we can pass down to all the// generator classes. Currently we pass dllexport_decl down to all of// them via the constructors, but we don't want to have to add another// constructor parameter for every option.// If the dllexport_decl option is passed to the compiler, we need to write// it in front of every symbol that should be exported if this .proto is// compiled into a Windows DLL. E.g., if the user invokes the protocol// compiler as:// protoc --cpp_out=dllexport_decl=FOO_EXPORT:outdir foo.proto// then we'll define classes like this:// class FOO_EXPORT Foo {// ...// }// FOO_EXPORT is a macro which should expand to __declspec(dllexport) or// __declspec(dllimport) depending on what is being compiled.//

转载于:https://www.cnblogs.com/zhongpan/p/8378825.html

你可能感兴趣的文章
阶段3 2.Spring_03.Spring的 IOC 和 DI_2 spring中的Ioc前期准备
查看>>
阶段3 2.Spring_03.Spring的 IOC 和 DI_6 spring中bean的细节之三种创建Bean对象的方式
查看>>
阶段3 2.Spring_04.Spring的常用注解_2 常用IOC注解按照作用分类
查看>>
阶段3 2.Spring_09.JdbcTemplate的基本使用_5 JdbcTemplate在spring的ioc中使用
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第11节 Logback日志框架介绍和SpringBoot整合实战_45、SpringBoot2.x日志讲解和Logback配置实战...
查看>>
小D课堂 - 新版本微服务springcloud+Docker教程_4-05 微服务调用方式之feign 实战 订单调用商品服务...
查看>>
UI基础--烟花动画
查看>>
Android dex分包方案
查看>>
ThreadLocal为什么要用WeakReference
查看>>
删除本地文件
查看>>
FOC实现概述
查看>>
gethostbyname与sockaddr_in的完美组合
查看>>
旋转变换(一)旋转矩阵
查看>>
thinkphp3.2.3 bug集锦
查看>>
C# 创建 读取 更新 XML文件
查看>>
KD树
查看>>
VsVim - Shortcut Key (快捷键)
查看>>
HDU5447 Good Numbers
查看>>
08.CXF发布WebService(Java项目)
查看>>
java-集合框架
查看>>