frepo again (long)

andy@softbookpress.com andy@softbookpress.com
Wed Feb 21 21:24:00 GMT 2001


I'm having problems again with -frepo option in gcc 2.95.2 on netwinder
linux (armv4l)
This is a new box with upgraded memory.
On the previous one I managed to get around this by recompiling gcc and
applying a fix in tlink.c by  Chris Rankin  but this no longer works.
I also upgraded binutils to 2.10.1
Could this be the cause of the problem ?
Any help is appreciated
Andy

here's the sample program map-vec.cpp

#include <map>
#include <vector>
#include <string>
#include <stdio.h>

int main()
{
  map<char,int> mymap;
 vector<string> myvec;
  mymap['c'] = (int)1;
  myvec.push_back(string("Foo"));
  string g = myvec[0];
  printf("vector[0] = %s\n",g.c_str());
 return 0;
}

I use the commands:

$ gcc -frepo -o mapvec.o -c map-vec.cpp
$ gcc -frepo -o mapvec  map-vec.o -lstdc++
And get the following errors:

collect: recompiling map-vec.cpp
collect: recompiling map-vec.cpp
collect: recompiling map-vec.cpp
collect: relinking
map-vec.o: In function `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *
__uninitialized_copy<basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > *,
basic_string<char, string_char_traits<char>, __default_alloc_template<true,
0> > >(basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > *,
basic_string<char, string_char_traits<char>, __default_alloc_template<true,
0> > *, basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *)':
map-vec.o(.gnu.linkonce.t.__uninitialized_copy__H3ZPt12basic_string3ZcZt18string
_char_traits1ZcZt24__default_alloc_template2b1i0ZPt12basic_string3ZcZt18string_c
har_traits1ZcZt24__default_alloc_template2b1i0Zt12basic_string3ZcZt18string_char
_traits1ZcZt24__default_alloc_template2b1i0_X01X01X11PX21_X11+0x30):
undefined reference to `basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *
__uninitialized_copy_aux<basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >
*>(basic_string<char, string_char_traits<char>,
__default_alloc_template<true, 0> > *, basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> > *,
basic_string<char, string_char_traits<char>, __default_alloc_template<true,
0> > *, __false_type)'
collect2: ld returned 1 exit status





More information about the Gcc-help mailing list