[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GCC 2.95.2 -frepo option
From: |
kaedeRukawa_jp |
Subject: |
GCC 2.95.2 -frepo option |
Date: |
18 May 2005 16:37:16 -0700 |
User-agent: |
G2/0.2 |
Hi all,
I try to used -frepo to create a repository for my template classes.
But I got an undefine reference all the time. The following are the
code snipplet:
-- a.h --
#ifndef A_H
#define A_H
#incldue <map>
using std::map;
struct Info { // .. }
class A
{
public:
Info get(int key);
void set(int key, Info data);
private:
map<int, Info> mMap;
};
#endif
-- a.cxx --
#include "a.h"
void A::set(int key, Info data)
{
mMap.insert(make_pair(key, data));
}
Info A::get(int key)
{
map<int, Info>::iterator it = mMap.find(key);
return it->second;
}
When I compile the above program with -frepo, I got the following error
during link time:
In function `A::set(void)': undefined reference to `_Rb_tree<int,
pair<int const, Info>, _Select1st<pair<int const, Info> >, less<int>,
allocator<Info>
::insert_unique(pair<int const, Info> const &)'
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::insert_unique(pair<int const, Info> const &)'
`A::get(void)':
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::find(int const &)'
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::find(int const &)'
In function `map<int, Info, less<int>, allocator<Info>
>::insert(pair<int const, Info> const &)':
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::insert_unique(pair<int const, Info> const &)'
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::insert_unique(pair<int const, Info> const &)'
`map<int, Info, less<int>, allocator<Info> >::find(int const &)':
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::find(int const &)'
undefined reference to `_Rb_tree<int, pair<int const, Info>,
_Select1st<pair<int const, Info> >, less<int>, allocator<Info>
>::find(int const &)'
Thanks,
KK
- GCC 2.95.2 -frepo option,
kaedeRukawa_jp <=
Re: GCC 2.95.2 -frepo option, Bernd Strieder, 2005/05/23