On 7/2/2011 4:56 AM, Roger Meier wrote: > Hi Gautam > > I cannot reproduce that isse on my Debian Squeeze using g++ 4.4.5. > What happens when you add a -Wall compile flag to the Makefile ? >
I have confirmed that gcc-4.6.0 and the latest gcc-4.6.1 have this problem. Also, I built gcc-4.5.3, it DOES NOT have any problems. As for using the "-Wall" flag, i have copied the output below - it shows some warning but nothing related to UNDEFs for VERSION_1 and VERSION_MASK. I suspect some new C++ standard rule must be in gcc-4.6.x series and this may lead to name space issues. But I don't know the thrift stuff well enough to quite figure this out in limited time I have spent on it. Gautam fc15-32> g++ -Wall -o CppServer -I/home/gthaker/usr/include/thrift -I/usr/include/boost -I../gen-cpp -L/h> ../gen-cpp/Calculator.h: In member function 'virtual int32_t tutorial::CalculatorMultiface::calculate(int32_t, const tutorial::Work&)': ../gen-cpp/Calculator.h:491:3: warning: control reaches end of non-void function [-Wreturn-type] ../gen-cpp/Calculator.h: In member function 'virtual int32_t tutorial::CalculatorMultiface::add(int32_t, int32_t)': ../gen-cpp/Calculator.h:480:3: warning: control reaches end of non-void function [-Wreturn-type] ../gen-cpp/Calculator.h: In member function 'virtual int32_t tutorial::CalculatorMultiface::calculate(int32_t, const tutorial::Work&)': ../gen-cpp/Calculator.h:491:3: warning: control reaches end of non-void function [-Wreturn-type] ../gen-cpp/Calculator.h: In member function 'virtual int32_t tutorial::CalculatorMultiface::add(int32_t, int32_t)': ../gen-cpp/Calculator.h:480:3: warning: control reaches end of non-void function [-Wreturn-type] /tmp/ccrEAa1g.o: In function `apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::writeMessageBegin(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, apache::thrift::protocol::TMessageType, int)': CppServer.cpp:(.text._ZN6apache6thrift8protocol16TBinaryProtocolTINS0_9transport10TTransportEE17writeMessageBeginERKSsNS1_12TMessageTypeEi[apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::writeMessageBegin(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, apache::thrift::protocol::TMessageType, int)]+0x15): undefined reference to `apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_1' /tmp/ccrEAa1g.o: In function `apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::readMessageBegin(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, apache::thrift::protocol::TMessageType&, int&)': CppServer.cpp:(.text._ZN6apache6thrift8protocol16TBinaryProtocolTINS0_9transport10TTransportEE16readMessageBeginERSsRNS1_12TMessageTypeERi[apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::readMessageBegin(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, apache::thrift::protocol::TMessageType&, int&)]+0x33): undefined reference to `apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_MASK' CppServer.cpp:(.text._ZN6apache6thrift8protocol16TBinaryProtocolTINS0_9transport10TTransportEE16readMessageBeginERSsRNS1_12TMessageTypeERi[apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::readMessageBegin(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, apache::thrift::protocol::TMessageType&, int&)]+0x3d): undefined reference to `apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTransport>::VERSION_1' collect2: ld returned 1 exit status > Regards > Roger > >> -----Ursprüngliche Nachricht----- >> Von: Gautam Thaker [mailto:[email protected]] >> Gesendet: Dienstag, 28. Juni 2011 21:15 >> An: [email protected] >> Betreff: undefined references to VERSION_MASK and VERSION_1 >> >> When compiling the "cpp" example in "tutorial", i get: >> >> CppServer.o >> U >> > apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTrans > p >> ort>::VERSION_MASK >> U >> > apache::thrift::protocol::TBinaryProtocolT<apache::thrift::transport::TTrans > p >> ort>::VERSION_1 >> >> I am running on Fedora 15 w/ GCC/G++ 4.6.0. The ./configure and "make" >> and "make install" had gone w/o errors (as far as I could tell.) >> >> Any hints welcome. I tried to google this, but found nothing. >> >> Gautam >> >> >> > > >
