help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GCC 2.95.2 -frepo option


From: Larry I Smith
Subject: Re: GCC 2.95.2 -frepo option
Date: Thu, 19 May 2005 00:00:48 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

kaedeRukawa_jp@hotmail.com wrote:
> 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"
> 

#include <utility>  // for make_pair
// include any other necessary Standard Headers

using namespace std;

> 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:
> 

[...]

> Thanks,
> KK
> 

Regards,
Larry

-- 
Anti-spam address, change each 'X' to '.' to reply directly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]