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 ChrisLansman: http://wiki.apache.org/thrift/ThriftUsageC%2B%2B?action=diff&rev1=31&rev2=32 Comment: typo 's' was lowercase for client file name, fixed the makefile client/server compile commands, library links need to come at the end of the sequence. Updated client wording g++ -L/usr/local/lib *.o -o Something_server -lthrift }}} == Writing the client code == - {{{thrift}}} generates a client interface, but you have to hook it up a bit on your own. + {{{thrift}}} does not auto generate a client interface, so you have to create the file. {{{#!highlight c++ #include "Something.h" // As an example @@ -150, +150 @@ }}} === Compiling === {{{ - g++ -Wall -I/usr/local/include/thrift -c something_client.cpp -o client.o + g++ -Wall -I/usr/local/include/thrift -c Something_client.cpp -o client.o }}} === Linking === {{{ @@ -176, +176 @@ $(CXX) -Wall $(INC) -c $< -o $@ something_server: Something_server.o $(GEN_OBJ) - $(CXX) -L/usr/local/lib -lthrift $^ -o $@ + $(CXX) $^ -o $@ -L/usr/local/lib -lthrift something_client: Something_client.o $(GEN_OBJ) - $(CXX) -L/usr/local/lib -lthrift $^ -o $@ + $(CXX) $^ -o $@ -L/usr/local/lib -lthrift clean: $(RM) *.o something_server something_client
