PDA

View Full Version : linking a google protobuf file and a QT file



pratikag
29th June 2010, 14:32
Hi,

I have written a QT program that has roughly 30 files (headers and cpp files). I needed to send data using UDP and so I chose protobuf to serialize the data.

I am using qmake to generate the makefile. On doing so I get a errors for all the function in the *.pb.cc file generated by protoc. For other applications if I write the makefile on my own it works fine but I want to use qmake to generate the Makefile. I am guessing that I am not being able to add the cflags or lflags properly.

I know it is a very small problem and I am making some silly mistake.

Can some one help please.

tbscope
29th June 2010, 14:59
Can you please post the contents of your .pro file?

pratikag
29th June 2010, 19:52
without protobuf file which is "../vision/sujeeth_vision_data.pb.h" it works fine


################################################## ####################
# Automatically generated by qmake (2.01a) Tue Jun 29 17:10:54 2010
################################################## ####################

TEMPLATE = app
TARGET =
DEPENDPATH += .
INCLUDEPATH += .
LIB += -L/usr/local/lib -lprotobuf -lz

# Input
HEADERS += ../modules/standardModule.h \
../modules/visionModule.h \
../world/world.h \
../utils/geometry.h \
../world/robot.h \
../world/football.h \
../simulator/phySim.h \
../params/ground_det.h \
../params/gamePlay.h \
../simulator/collision.h \
../utils/timer/timer.h \
../info/condition.h \
../control/controlData.h \
../dataStructures/destination.h \
../vision/cameraData.h \
../networking/udp_receiver.h \
../vision/sujeeth_vision_data.pb.h \
../modules/strategyModule.h \
../strategy/plays/allPlays.h \
../strategy/plays/play.h \
../strategy/plays/try_play.h \
../strategy/skills/allSkills.h \
../strategy/skills/skill.h \
../strategy/skills/tryskill.h \
../strategy/skills/moveToBall.h \
../strategy/skills/minAngleGoalie.h \
../strategy/skills/minAngleDefender.h \
../strategy/skills/minAngleDefender2.h \
../strategy/skills/biggestNoShadowOponent.h \
../strategy/skills/rotateToGoal.h \
../modules/controlModule.h \
../control/tree.h \
../control/rrt.h \
../control/pc_uart.h \
../control/send_robot.h \
../networking/network_utils.h
SOURCES += main.cpp \
../modules/standardModule.cpp \
../modules/visionModule.cpp \
../world/world.cpp \
../utils/geometry.cpp \
../world/robot.cpp \
../world/football.cpp \
../simulator/phySim.cpp \
../simulator/collision.cpp \
../utils/timer/timer.cpp \
../info/condition.cpp \
../control/controlData.cpp \
../dataStructures/destination.cpp \
../vision/cameraData.cpp \
../networking/udp_receiver.cpp \
../vision/sujeeth_vision_data.pb.cc \
../modules/strategyModule.cpp \
../strategy/plays/play.cpp \
../strategy/plays/try_play.cpp \
../strategy/skills/skill.cpp \
../strategy/skills/tryskill.cpp \
../strategy/skills/moveToBall.cpp \
../strategy/skills/minAngleGoalie.cpp \
../strategy/skills/minAngleDefender.cpp \
../strategy/skills/minAngleDefender2.cpp \
../strategy/skills/biggestNoShadowOponent.cpp \
../strategy/skills/rotateToGoal.cpp \
../modules/controlModule.cpp \
../control/rrt.cpp \
../control/pc_uart.cpp \
../control/send_robot.cpp \
../networking/network_utils.cpp