Dear Wiki user, You have subscribed to a wiki page or wiki category on "Thrift Wiki" for change notification.
The following page has been changed by relish: http://wiki.apache.org/thrift/ThriftUsageC++ ------------------------------------------------------------------------------ }}} == Compiling/Building the server == - To be done... + + To quickly build a binary using a single command use: + {{{ + g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something + }}} === Compiling === + You need to point your compiler to the thrift include path (CXX flag: {{{ -I/usr/local/include/thrift}}}) + + {{{ + g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o + g++ -Wall -I/usr/local/include/thrift -c Something_server.cpp -o server.o + g++ -Wall -I/usr/local/include/thrift -c your-thrift-file_constants.cpp -o constants.o + g++ -Wall -I/usr/local/include/thrift -c your-thrift-file_types.cpp -o types.o + }}} === Linking === You need to point your linker to the thrift library. (Linker flag: {{{ -lthrift }}} or {{{ -l/usr/local/lib/libthrift.so }}} + {{{ + ld -L/usr/local/lib -lthrift *.o -o Something_server + }}} +
