
On Friday 24 March 2006 16:57, Anders Johansson wrote:
On Friday 24 March 2006 23:42, Darrell Cormier wrote:
btw, quick fix/workaround: what are you including that pulls in sstream.tcc? <complex>? Whatever it is, put
#undef min #undef max
immediately before the #include, and you will at least not see these errors again. (And perhaps with a little luck whatever it is that #defines them will throw an error because of it, so you can see what it is)
-- Certified: Yes. Certifiable: of course! jabber ID: anders@rydsbo.net
Thanks Anders, When I make the following change to a header file: #undef min #undef max #include <sstream> Then my build messages change from: /usr/include/c++/4.0.2/bits/sstream.tcc: In member function 'virtual typename std::basic_stringbuf<_CharT, _Traits, _Alloc>::int_type std::basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(typename _Traits::int_type)': /usr/include/c++/4.0.2/bits/sstream.tcc:112: error: expected unqualified-id before '(' token /usr/include/c++/4.0.2/bits/sstream.tcc:114: error: expected unqualified-id before '(' token gmake[2]: *** [wmap_search_server.o] Error 1 To: linking wmap_search (g++) /home/dcormier/develop/lubbock_services/lib/libCfunc.a(dir_files.o): In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)': dir_files.C: (.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x27): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned int, std::allocator<char> const&)' dir_files.C: (.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x58): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' dir_files.C: (.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x5e): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' /home/dcormier/develop/lubbock_services/lib/libtcp.a(tcpServer.o): In function `tcpServer::signal_action(int)': tcpServer.C:(.text+0x43c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' tcpServer.C:(.text+0x443): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' tcpServer.C:(.text+0x468): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' /home/dcormier/develop/lubbock_services/lib/libtcp.a(tcpServer.o):tcpServer.C: (.text+0x470): more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' follow collect2: ld returned 1 exit status gmake[2]: *** [wmap_search] Error 1 gmake[2]: Target `all' not remade because of errors. Not sure what to do with that information yet, but it is a start. Thanks, DC