-frepo not working?
Lee Iverson
leei@ai.sri.com
Wed Dec 16 12:44:00 GMT 1998
In message < 367801D4.F6C06EC3@redrose.net > you write:
>
> This can be reproduced very easily. I will show you an example using
> egcs-1.1.1:
>
> _________________________________
>
> // repo-fail.cc
> #include <vector>
>
> void main()
> {
> vector<int> v;
>
> v.push_back(1);
> }
>
> _________________________________
>
>
> chad:/tmp> g++ -c -frepo repo-fail.cc
> chad:/tmp> g++ -o repo-fail repo-fail.o
> repo-fail.o: In function `vector<int, __default_alloc_template<false, 0>
> >::push_back(int const &)':
> repo-fail.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
>
Bzzzt... Close but... -frepo is a *linker* command. Try adding it
to the second line 'g++ -frepo -o repo-fail repo-fail.o'
-------------------------------------------------------------------------------
Lee Iverson SRI International
leei@ai.sri.com 333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/ (650) 859-3307
More information about the Gcc-bugs
mailing list