Template Inheritance and Instantiation -- A Simpler Hashtable Iterator

Chad Gatesman chadg@redrose.net
Fri Sep 4 21:38:00 GMT 1998


It turns out that I can't use -frepo at all with egcs-1.1a.
Even the simplest samples don't link:

-- t.cc
#include <vector>

void main()
{
     vector<int> Vector;

     Vector.push_back(1);
}



chad:/tmp> g++ -c -frepo t.cc
chad:/tmp> g++ -frepo -o t t.o
t.o: In function `vector<int, __default_alloc_template<false, 0>
>::push_back(int const &)':
t.o(.vector<int, __default_alloc_template<0, 0>
>::gnu.linkonce.t.push_back(int const &)+0x35): undefined reference to
`vector<int, __default_alloc_template<false, 0> >::insert_aux(int *, int
const &)'
collect2: ld returned 1 exit status
chad:/tmp> g++ -c -frepo t.cc
chad:/tmp> g++ -frepo -o t t.o
t.o: In function `vector<int, __default_alloc_template<false, 0>
>::push_back(int const &)':
t.o(.vector<int, __default_alloc_template<0, 0>
>::gnu.linkonce.t.push_back(int const &)+0x35): undefined reference to
`vector<int, __default_alloc_template<false, 0> >::insert_aux(int *, int
const &)'
collect2: ld returned 1 exit status



Was this a regression that was fixed in egcs-1.1b (I'm currently
downloading it (no patch from 1.1a to 1.1b?))?  Or is there something else
I have to do now with the newer egcs to support -frepo?


--
Chad Gatesman                 Home:  203.730.1389
Software Engineer             Work:  203.798.1007 x144
Bristol Technology            http://www.bristol.com/





More information about the Gcc mailing list