Protocol Buffer using QT creator

1,898 views
Skip to first unread message

$Qtnewbiesrj$

unread,
Feb 25, 2014, 3:11:13 AM2/25/14
to prot...@googlegroups.com

Wanted to test protocol buffers using Qt.

I'm using Qt5.2.1 on Qt Creator 3.0.1.


I added a shell command to run protoc on my sample .proto file, to produce .pb.h and .pb.cc files ( in C++ )

included my headers using

INCLUDEPATH += $$PWD/../../DevTools/DEV/PROTOBUFF/protoinstall/include ( also tried with the absolute path)

LIBS += -L"<lib path here" -lprotobuf

Copied the libprotobuf-8.dll file into my release folder.

Still doesn't work. Am I missing something here.  Has anyone done this before ?

Thanks in advance.

Carl

unread,
Mar 5, 2014, 6:34:07 AM3/5/14
to prot...@googlegroups.com
I have and am using PB with Qt and Qt Creator, on MS Win 7 64 bit

This works ... 32 bit Qt 4.8, MSVS 2008, PB 2.5
Porting to  .... 64 bit Qt 5.2.2 MSVS 2012 PB 2.5

It is unclear from above, did you build PB from scratch on your machine? Can you run a simple PB only test test case?

Once you have the PB library, I am assuming you are using the Qt binaries as supplied? 

Did the above linkage work, did you get an executable?

If yes then once you move into the Qt debug or release di you should see a .exe file. This will not likely run from a "command" or "bash" shell as oodles of dll are missing. (Qt creator puts them in it's path which is why that works) To figure out which dlls are missing run "depends" (http://www.dependencywalker.com/), read it's doc first some dlls are expected to be missing.

That should get you going.

Regards
Carl
Reply all
Reply to author
Forward
0 new messages