Ubuntu thrift 服务编译 未找到TSimpleServer的引用

环境 Ubuntu16.04 g++ 5.4 thrift 0.11
thrift已安装正确,生成相应的cpp代码 进行服务端编译 makefile如下
1 CC=g++ -Wall -O2
2 CFLAGS=-I/usr/local/include/thrift -I./
3 LFLAGS=-L/usr/local/lib
4 LDEXEFLAGS=-lthrift
5 CPPDEFS=-DHAVE_NETINET_IN_H
6 SRC=test_service.cpp\
7 test_types.cpp\
8 test_constants.cpp
9
10 all: server
11
12 server: test_service_server.skeleton.cpp
13 ${CC} ${CPPDEFS} -o server ${CFLAGS} test_service_server.skeleton.cpp ${SRC} ${LFLAGS} ${LDEXEFLAGS}
14
15
16 clean:
17 rm -f ./*.o server

编译后出现
g++ -Wall -O2 -DHAVE_NETINET_IN_H -o server -I/usr/local/include/thrift -I./ test_service_server.skeleton.cpp test_service.cpp test_types.cpp test_constants.cpp -L/usr/local/lib -lthrift
/tmp/cckAX0Xn.o:在函数‘main’中:
test_service_server.skeleton.cpp:(.text.startup+0x299):对‘apache::thrift::server::TSimpleServer::TSimpleServer(boost::shared_ptrapache::thrift::TProcessor const&, boost::shared_ptr :TServerTransport> const&, boost::shared_ptrapache::thrift::transport::TTransportFactory const&, boost::shared_ptrapache::thrift::protocol::TProtocolFactory const&)’未定义的引用
collect2: error: ld returned 1 exit status
makefile:13: recipe for target 'server' failed
make: *** [server] Error 1

这样的错误,但是查看资料,lthrift已经在最后,不知为何还会出错?

/tmp/ccX2bX8q.o: In function `main':
/root/workspace/thrift/test3/gen-cpp/WorkerManager_server.skeleton.cpp:41: undefined reference to `apache::thrift::server::TSimpleServer::TSimpleServer(boost::shared_ptr<apache::thrift::TProcessor> const&, boost::shared_ptr<apache::thrift::transport::TServerTransport> const&, boost::shared_ptr<apache::thrift::transport::TTransportFactory> const&, boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> const&)'
collect2: error: ld returned 1 exit status

由于使用了 boost 库,
改为 stdcxx 即可,-std=c++11

g++ -g -Wall -I./ -I/usr/local/include/thrift WorkerManager.cpp worker_types.cpp worker_constants.cpp WorkerManager_server.skeleton.cpp -L/usr/local/lib/*.so -lthrift -std=c++11 -o server
``

是shared_ptr连接的问题,应该链接stdcxx的库