I've never tried Thrift in C++, even though it's my primary programming language, but it seems that you should have made a child class of CalculatorHandler and override its methods. These methods should be implementations of RPC services.
2015-09-06 23:55 GMT+03:00 Mohamed Nadjib MAMI <[email protected]>: > Dear all, > > I'm a beginner in Thrift. I'm trying to get started with the example of > Calculator using C++ on Windows (10). Given that the tutorial was a bit > difficult to me, I followed a more simplified one here: > https://elektron9.wordpress.com/2014/09/24/configuring-apache-thrift-for-visual-studio-2012/ > . > > Everything worked as expected until step 11 in building and running Thrift > server. If you don't want to open it, it's the step of building Thrift > server after having generated the .h and .ccp files using thrift compiler, > and setting the Additional Includes, Dependencies and Libraries inside MS > Visual Studio 2013. > > The error I'm getting is: "'CalculatorHandler': cannot instantiate abstract > class" > > ... corresponding to the line: > > shared_ptr<CalculatorHandler> handler(new CalculatorHandler()); > > ... in the generated file: 'Calculator_server.skeleton.ccp' > > By my little C++ knowledge and some Googling, I could interpret the error, > but I couldn't solve it. Can any one help? > > Thanks in advance! > MNM
