[Click] hashmap
Bart Van Keyenberg
bartvk8 at hotmail.com
Mon Mar 14 08:15:08 EST 2005
Hi,
Like Alan I am trying to use the hashmap from click.
As key value I use an unsgined (hash of ipaddress). As value for each key I
use a self written class called Userinfo. When I compile this, the compiler
gives some errors about undefined references.
Here's a piece of the code
//-*-c-basic-offset: 4 -*-
#ifndef CLICK_DUMMY_HH
#define CLICK_DUMMY_HH
#include <click/hashmap.hh>
#include "userinfo.hh"
CLICK_DECLS
class Dummy { public:
Dummy();
~Dummy();
void dosomething();
private:
HashMap<unsigned, Userinfo> _map;
};
CLICK_ENDDECLS
#endif
The errors @ compile time are the following
dummy.o(.text+0x1b): In function `Dummy::~Dummy [in-charge]()':
../elements/local/dummy.cc:7: undefined reference to `HashMap<unsigned,
Userinfo>::~HashMap [in-charge]()'
dummy.o(.text+0x3b): In function `Dummy::~Dummy [not-in-charge]()':
../elements/local/dummy.cc:7: undefined reference to `HashMap<unsigned,
Userinfo>::~HashMap [in-charge]()'
dummy.o(.text+0x55): In function `Dummy::Dummy[in-charge]()':
../elements/local/dummy.cc:6: undefined reference to `HashMap<unsigned,
Userinfo>::HashMap[in-charge]()'
dummy.o(.text+0x65): In function `Dummy::Dummy[not-in-charge]()':
../elements/local/dummy.cc:6: undefined reference to `HashMap<unsigned,
Userinfo>::HashMap[in-charge]()'
collect2: ld returned 1 exit status
make: *** [click] Fout 1
Kind Regards
<html><P><FONT size=5><EM><A href="mailto:bartvk8 at hotmail.com">Bart
V.K.</A></EM></FONT></P></html>
_________________________________________________________________
More information about the click
mailing list