Linking .proto file with qmake

I have 4 files

message.proto udp.h udp.cpp main.cpp

message.proto is a Google protocol spooled file. I am trying to write a protocol buffer and send and receive data using UDP. udp.h and udp.cpp are just classes for implementing UDP.

I can write my own makefile and do it for this small example. Later I would need to integrate this code into my QT program. I am using qmake -project, qmake to create a Makefile. I am using Ubuntu 9.10

Can someone tell me the changes that I need to make to the .pro file or the Makefile generated by qmake to satisfy the dependencies.

+5
source share
1 answer

HEADERS SOURCES .pro, ..

SOURCES += udp.cpp message.pb.cc
HEADERS += udp.h message.pb.h

, message.pb.cc message.pb.h - , protoc ( ). , make protoc , system (http://doc.trolltech.com/4.6/qmake-function-reference.html#system-command),

, .

+3

All Articles