apache/thrift — pull request #106 by apesternikov (2014-04-22 14:28:39+00:00)
Title: THRIFT-2492 use tcxx instead of tr1 in test/cpp

THRIFT-2492
Now it complies, but fails to link later:
/Applications/Xcode.app/Contents/Developer/usr/bin/make TestServer TestClient StressTest StressTestNonBlocking
/bin/sh ../../libtool --tag=CXX --mode=link g++ -Wall -std=c++11 -stdlib=libc++ -L/usr/local/lib -L/usr/local/opt/openssl/lib -o TestServer TestServer.o libtestgencpp.la ../../lib/cpp/libthrift.la ../../lib/cpp/libthriftz.la ../../lib/cpp/libthriftnb.la -levent -lboost_program_options -lssl -lcrypto -lpthread
libtool: link: g++ -Wall -std=c++11 -stdlib=libc++ -o .libs/TestServer TestServer.o -Wl,-bind_at_load -L/usr/local/lib -L/usr/local/opt/openssl/lib ./.libs/libtestgencpp.a /Users/ap/thrift-dev/lib/cpp/.libs/libthrift.dylib ../../lib/cpp/.libs/libthrift.dylib ../../lib/cpp/.libs/libthriftz.dylib ../../lib/cpp/.libs/libthriftnb.dylib -levent -lboost_program_options -lssl -lcrypto -lpthread
Undefined symbols for architecture x86_64:
"thrift::test::Insanity::operator<(thrift::test::Insanity const&) const", referenced from:
std::__1::__tree_node_base*& std::__1::__tree, std::__1::allocator > >, std::__1::__map_value_compare, std::__1::allocator > >, std::__1::less, true>, std::__1::allocator, std::__1::allocator > > > >::__find_equal, std::__1::allocator > > >(std::__1::__tree_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long>, std::__1::__tree_node_base*&, std::__1::__value_type, std::__1::allocator > > const&) in libtestgencpp.a(ThriftTest_types.o)
std::__1::__tree_node_base*& std::__1::__tree, std::__1::allocator > >, std::__1::__map_value_compare, std::__1::allocator > >, std::__1::less, true>, std::__1::allocator, std::__1::allocator > > > >::__find_equal, std::__1::allocator > > >(std::__1::__tree_node_base*&, std::__1::__value_type, std::__1::allocator > > const&) in libtestgencpp.a(ThriftTest_types.o)
bool std::__1::__lexicographical_compare, std::__1::allocator > >, std::__1::pair, std::__1::allocator > > >&, std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> >, std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> > >(std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> >, std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> >, std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> >, std::__1::__map_const_iterator, std::__1::allocator > >, std::__1::__tree_node, std::__1::allocator > >, void*>*, long> >, std::__1::__less, std::__1::allocator > >, std::__1::pair, std::__1::allocator > > >&) in libtestgencpp.a(ThriftTest_types.o)
std::__1::__tree, std::__1::allocator > >, std::__1::__map_value_compare, std::__1::allocator > >, std::__1::less, true>, std::__1::allocator, std::__1::allocator > > > >::__find_leaf_high(std::__1::__tree_node_base*&, std::__1::__value_type, std::__1::allocator > > const&) in libtestgencpp.a(ThriftTest_types.o)
std::__1::__tree, std::__1::allocator >::__find_leaf_high(std::__1::__tree_node_base*&, thrift::test::Insanity const&) in libtestgencpp.a(ThriftTest_types.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [TestServer] Error 1
make: *** [check-am] Error 2

Interestingly, "thrift::test::Insanity::operator<(thrift::test::Insanity const&) const" is declared in ThriftTest_types.h as
bool operator < (const Insanity & ) const;
but never defined.