Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Thrift Wiki" for change 
notification.

The "ThriftUsageC++" page has been changed by AkiraKitada.
http://wiki.apache.org/thrift/ThriftUsageC%2B%2B?action=diff&rev1=26&rev2=27

--------------------------------------------------

  g++ -L/usr/local/lib -lthrift client.o Something.o constants.o types.o -o 
Something_client
  }}}
  
+ == Compiling/Building everything with Makefile ==
+ 
+ {{{#!Makefile
+ GEN_SRC := Something.cpp your_thrift_file_constants.cpp 
your_thrift_file_types.cpp
+ GEN_OBJ := $(patsubst %.cpp,%.o, $(GEN_SRC))
+ 
+ THRIFT_DIR := /usr/local/include/thrift
+ BOOST_DIR := /usr/local/include
+ 
+ INC := -I$(THRIFT_DIR) -I$(BOOST_DIR)
+ 
+ .PHONE: all clean
+ 
+ all: something_server something_client
+ 
+ %.o: %.cpp
+       $(CXX) -Wall $(INC) -c $< -o $@
+ 
+ something_server: Something_server.o $(GEN_OBJ)
+       $(CXX) -L/usr/local/lib -lthrift $^ -o $@
+ 
+ something_client: Something_client.o $(GEN_OBJ)
+       $(CXX) -L/usr/local/lib -lthrift $^ -o $@
+ 
+ clean:
+       $(RM) *.o something_server something_client
+ }}}
+ 

Reply via email to