protobuf

Google::protobuf + boost::asio failure

匿名 (未验证) 提交于 2019-12-03 01:18:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have studied the existing examples: Sending Protobuf Messages with boost::asio Reading Protobuf objects using boost::asio::read_async Google Protocol Buffers: parseDelimitedFrom and writeDelimitedTo for C++ Are there C++ equivalents for the Protocol Buffers delimited I/O functions in Java? Sending Protobuf Messages with boost::asio but I still can not figure out how to pass Google Protobuf messages using the Boost::asio API. In particular I have no clear understanding of the following problems: Interaction between boost::asio:

Protobuf version conflicts with Qt

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use protobufs v 3.3.2 with Qt 5.9.1. This works with some Qt applications, but only if they are command line programs. Once I create a GUI application with Qt and protobufs, I get this error: [libprotobuf FATAL /home/mkraus/Documents/dev/star385/build/linux-desktop-debug-libs/protobuf/src/src/google/protobuf/stubs/common.cc:78] This program was compiled against version 2.6.1 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.3.2). Contact the program author for an update. If you

undefined reference to google::protobuf in ROS CPP

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use Protocol Buffers in ROS Indigo. It seems that there are problems in linking CPP source code. While compiling, it throws following errors: Linking CXX executable /home/ravi/ros_ws/devel/lib/protobuf_ros_tutorial/add_person CMakeFiles/add_person.dir/src/add_person.cc.o: In function `PromptForAddress(tutorial::Person*)': add_person.cc:(.text+0x6a): undefined reference to `google::protobuf::internal::fixed_address_empty_string' add_person.cc:(.text+0x1a5): undefined reference to `google::protobuf::internal::ArenaImpl:

Google's Vision Api protobuf response object to Python dictionary

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm working on a project in which I need to analyze an image using Google's Vision API and post the response to a Dynamodb table. I have successfully implemented the Vision API, but not able to convert its response into Python Dictionary. Here's what I have tried: if form.is_valid(): obj = form obj.imageFile = form.cleaned_data['imageFile'] obj.textFile = form.cleaned_data['textFile'] obj.save() print(obj.imageFile) # Process the image using Google's vision API image_path = os.path.join(settings.MEDIA_ROOT, 'images/', obj.imageFile.name)

Protobuf - Refuses to link vs2013 or vs2015

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As the title states I cannot get protobuf to link successfully. Here is the small test program. note the AddressBook class was generated usin gthe protoc compiler that was built when i compiled protobuf.Additionally, this proto file is part of googles protobuf examples that is included with the source. #define PROTOBUF_USE_DLLS #include <iostream> #include "addressbook.pb.h" #pragma comment(lib, "libprotocd.lib") #pragma comment(lib, "libprotobufd.lib") #pragma comment(lib, "libprotobuf-lited.lib") int main(int argc, const char* argv[]) {

Error: Illegal wire type for field Message.Field .protobuf.MessageTypeAck.sourceModuleID: 1 (0 expected)

匿名 (未验证) 提交于 2019-12-03 01:00:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've app that procude&consume message with kafka and protocol buffer and everything works great. I'm serialize the protocol buffer with SerializeAsString() (this app was written in c++). Now, I've added new node.js website that also consume messages and try to decode them. My js code (using the great ProtoBuf.js module): var builder = ProtoBuf.loadProtoFile("/home/aii/general/proto/All.proto"), protobuf = builder.build("protobuf"), Trace = protobuf.Trace, MessageType = protobuf.MessageType, MessageTypeAck = protobuf.MessageTypeAck,

Python grpc protobuf stubs generation issue: --grpc_out: protoc-gen-grpc: Plugin failed with status code 1

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: As the question says, I compiled grpc from source and also did sudo pip install grpcio , however, the which grpc_python_plugin doesn't return anything. This is a problem because the grpc python example for route_guide requires me to run protoc -I . --python_out=. --grpc_out=. --plugin=protoc-gen-grpc='which grpc_python_plugin' ./route_guide.proto in order to generate the python stubs. Since, which grpc_python_plugin doesn't return anything, I get the following error: : program not found or is not executable --grpc_out: protoc-gen-grpc:

caffe2环境配置之入坑跳坑

匿名 (未验证) 提交于 2019-12-03 00:32:02
环境 : Centos 7 + cuda-8.0 + cudnn-v6.0 + python2.7 + caffe2 该方法适应于权限有限的用户(无 sudo 权限)(不能在 /usr/local生成protobuf等自编译文件 ) 以及处于公司内网不能访问外网情况 对于处于内网环境来说,一定要在外网把第三方库都下完全了, git clone --recursive https: //github.com/caffe2/caffe2.git cd ROOT_CAFFE2 mkdir build && cd build cmake .. make -j8 install 当需要指定安装目录时,可以将 make -j8 install 改为 export DESTDIR="$HOME" && make -j8 install , 然后配置环境 export PATH = "/home/XX/usr/local/caffe2:$PATH" export PYTHONPATH = /home/ XX /usr/ local: $PYTHONPATH export PYTHONPATH = $PYTHONPATH :/home/XX/caffe2/build export LD_LIBRARY_PATH = /home/ XX /usr/local/ lib: $LD_LIBRARY

Check failed: registry.count(type) == 0 (1 vs. 0) Layer type Convolution already registered

匿名 (未验证) 提交于 2019-12-03 00:30:01
在复现别人caffe程序的时候遇到了这么一个奇怪的问题,跟网上一个问题有点像: Check failed: registry.count(type) == 1 (0 vs. 1) Unknow layer type ,但是却是完全不同的两个问题。 我这个问题的 原因 是由于系统protobuf和python的protobuf版本不一致导致的,因为按照 caffe官方 给出的Ubuntu依赖库安装方式,系统protobuf是通过安装的: sudo apt -get install libprotobuf -dev libleveldb -dev 如果 protoc --version 查看版本的话,应该是2.6.1。 但是python的protobuf是通过 pip install -r requirements.txt 安装的,里面protobuf>=2.5.0,这样会默认安装3.x.x版本的protobuf。这样就导致了protobuf版本的不一致,在某些caffe程序中就会出现题中的问题。 解决方案很简单:(1)升级系统protobuf。(2)通过如下代码降级python中的protobuf。 pip uninstall protobuf pip install protobuf= = 2.6.1 (3)采用python的虚拟环境。(4)docker。 我采用了第(2)中方式

cocos2dx lua + protobuf

匿名 (未验证) 提交于 2019-12-03 00:22:01
vs 2015 cocos2dx 3.10 lua protobuf 1. 下载 protobuf 源码 https://github.com/bnnswyp/protobuf/tree/master/protobuf-2.5.0 解压后的文件列表如下所示 其中 vsprojects 文件夹为 protobuf 的vs 工程 2. 打开 protobuf.sln 编译 工程视图如下 编译报错 <hash_map> is deprecated and will be REMOVED ... 解决:项目->属性->配置属性->C/C++->预处理器->编辑 添加 _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS 编译报错: 错误 3 error C3861: “max”: 找不到标识符 f:\google\protobuf\protobuf- 解决:在头文件处 添加 #include <algorithm> 3. 编译成功后生成 protoc.exe 文件 4. 将 protobuf C++ 代码集成到 libcocos2d 项目中 1 修改 libcocos2d 项目 在 libcocos2d 项目 external 文件夹中增加新的 pcb 文件夹, 将 pbc.h 文件和 src 文件夹中的文件 拷贝到里面去,并添加到项目中 如下图 2 修改