Hi all,

This might not be entirely a thrift related question but it happened when I
made a change in the thrift file. Before making the change, everything was
working fine. I made a change to the thrift file and regenerated cpp & java
classes. After this change, I started getting linker errors in cpp. Here is
the error

Undefined symbols:

"com::XXXX::thrift::employee::SavingsInfo::operator<(com::XXXX::thrift::employee::SavingsInfo
const&) const", referenced from:

std::less<com::XXXX::thrift::employee::SavingsInfo>::operator()(com::XXXX::thrift::employee::SavingsInfo
const&, com::XXXX::thrift::employee::SavingsInfo const&) constin
employee_types.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [ThriftCPPSamples] Error 1

I added SavingsInfo type to thrift file, this is the change. I give all the
options mentioned in the doc to g++. I gave -I/usr/local/include/thrift,
-I/path-to-boost, -L/path-to-boost-lib, -lthrift. But after the change I
started getting the above linker error. I couldn't understand the reason for
this. The error points to something that was generated by thrift. What could
be the reason for the error?

Thank you.

Regards,
Raghava.

Reply via email to