Makefile:
CFLAGS = -c -g -W -O3 -Wall -Werror -Wshadow \
-Wno-long-long -Wpointer-arith -D_REENTRANT \
-D_POSIX_PTHREAD_SEMANTICS -DLINUX2 \
-I ./acl/lib_acl_cpp/include
BASE_PATH=./acl
LDFLAGS = -L$(BASE_PATH)/lib_acl_cpp/lib -l_acl_cpp \
-L$(BASE_PATH)/lib_protocol/lib -l_protocol \
-L$(BASE_PATH)/lib_acl/lib -l_acl \
-lpthread
redisConnection: redisConnection.o
g++ -o $@ $^ $(LDFLAGS)
redisConnection.o: redisConnection.cpp
g++ $(CFLAGS) redisConnection.cpp -o redisConnection.o
And I have generated the nrtprofile.pb.cc and nrtprofile.pb.h with the help of protoc command.
What changes must be made in the makefile because I am getting the following error in the class redisConnection.cpp when I am using the functions:
undefined reference to `google::protobuf::MessageLite::ParseFromString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
I have included nrtprofile.pb.h in the redisConnection.cpp
As here there are two things redisConnection and redisConnection.o, I am getting confused where should I write nrtprofile.pb.cc.