Set Up Creator For Thrift

1. Install Thrift

2. In /usr/local/include/thrift/Thrift.h  Add headers
#include
#include

3. Generate *.cpp and *.h from *.thrift

4. File->New-> Non-Qt project -> Plain C++ Project

5. Add all existing files from gen-cpp folder to the project.

6. Add following to pro file.

   QMAKE_CXXFLAGS += -std=c++0x -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -Wall
   INCLUDEPATH += -I/usr/local/include/thrift
   LIBS+= -L/usr/local/lib -lthrift

No comments:

Post a Comment