代码拉取完成,页面将自动刷新
编译UE使用的protobuf
Windows下编译Win64及Android库及UE使用的Linux库
PATH
中Mac机编译Mac及IOS库
下载Google Protobuf最新版(protobuf-cpp-x.x.x.zip)。
解压并改名为source
目录
修改源代码
source\src\google\protobuf\compiler\cpp\file.cc
// 方法:FileGenerator::GenerateSourceIncludes
format(
"// Generated by the protocol buffer compiler. DO NOT EDIT!\n"
"// source: $filename$\n"
+ "\n"
+ "// Disable UE4 VS warnings\n"
+ "#ifdef _MSC_VER\n"
+ "#\tpragma warning(disable: 4946)\n"
+ "#\tpragma warning(disable: 4125)\n"
+ "#\tpragma warning(disable: 4647)\n"
+ "#\tpragma warning(disable: 4668)\n"
+ "#\tpragma warning(disable: 4800)\n"
+ "#endif\n"
+ "\n"
"#include $1$\n"
编译
x64 Native Tools Command Prompt for VS XXX
,cd到工程目录执行BuildWindows.bat
BuildAndroid.bat
中NDK的路径BuildLinux.bat
中的UE所在路径mount_smbfs
指令挂载该目录BuildIOS
及BuildMac
UE4集成
Source/ThirdParty
目录下建立文件夹Protobuf
include
, lib
, Protobuf.Build.cs
拷贝到新建的目录下bin
目录下生成protoc.exe
生成*.pb.cc
及*.pb.h
文件此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。