=)

I have a question about "undefined reference to" in C++.

Here in this code i have the next:

```
#include "HelloWorldAgent/helloworldagent.hh"

int main()
{
   HelloWorldAgent agent;
   agent.run();
}

```

In another C++ file is the next code:

```
#ifndef _HELLOWORLDAGENT_HH_
#define _HELLOWORLDAGENT_HH_

#include "../../HumanoidAgent/humanoidagent.hh"

/**
 *  A friendly robot
 */
class HelloWorldAgent : public bats::HumanoidAgent
{
/**
 * Initialize agent
*
* Called a single time when starting up the agent. Put all your initialization stuff  
here.
*/
virtual void init();

/**
* Think cycle
*
* Called at each cycle after a message from the server is received and parsed. 
Put all your thinking and acting stuff here.
*/
virtual void think();

public:

/**
*  The Constructor
*
*  Sets this agent's teamname to "Hello". Consider putting initialization stuff in 
init() instead of here.
*/
HelloWorldAgent()
: HumanoidAgent(std::string("Hello"))
{
}

};

#endif

```

I try to compile it with g++ 

$ g++ -I /usr/include/eigen -I /usr/include/sigc++-2.0 -I /usr/lib/sigc++-2.0/include helloworld.cc

And gives me the next error:

In file included from /usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/ext/hash\_map:60:0,
 from HelloWorldAgent/../../HumanoidAgent/../WorldModel/../Hashclasses/hashclasses.hh:25,
 from HelloWorldAgent/../../HumanoidAgent/../WorldModel/worldmodel.hh:54,
 from HelloWorldAgent/../../HumanoidAgent/humanoidagent.hh:46,
 from HelloWorldAgent/helloworldagent.hh:44,
 from helloworld.cc:1:
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../../include/c++/4.5.2/backward/backward\_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward\_warning.h. To disable this warning use -Wno-deprecated.
/tmp/cc1cjIEs.o: In function `main':
helloworld.cc:(.text+0x29): undefined reference to`bats::HumanoidAgent::run()'
/tmp/cc1cjIEs.o: In function `HelloWorldAgent::HelloWorldAgent()':
helloworld.cc:(.text._ZN15HelloWorldAgentC2Ev[_ZN15HelloWorldAgentC5Ev]+0xfd): undefined reference to`vtable for HelloWorldAgent'
/tmp/cc1cjIEs.o: In function `HelloWorldAgent::~HelloWorldAgent()':
helloworld.cc:(.text._ZN15HelloWorldAgentD2Ev[_ZN15HelloWorldAgentD5Ev]+0xb): undefined reference to`vtable for HelloWorldAgent'
collect2: ld returned 1 exit status

I don't know what could it be, maybe i'm doing something wrong. Any ideas ?

Thanks in advance. =)

PS: No, it is not homework, it is just for fun =)