Member initialization fails...

I created a library that includes the NewSoftSerial Library. But the member initialization for the NewSoftSerial class fails. I have the following code:
The .h file

#ifndef Test_h
#define Test_h

#include "WConstants.h"
#include "NewSoftSerial.h"

class Test
{
  public:
  NewSoftSerial softserial;

  Test(); // constructor
};

#endif

The .cpp file

#include "WProgram.h"
#include "TestSoftSerialInclude.h"


Test::Test() : softserial(0, 0)
{

}

and my .pde

#include <TestSoftSerialInclude.h>


void setup()
{
  Test mytest;
}
void loop()
{
}

The library compiles correctly but when I create and instance of the Test class the following error is shown:

hardware\libraries\TestSoftSerialInclude\TestSoftSerialInclude.o: In function `Test':


C:\Program Files (x86)\Arduino\arduino-0015/hardware\libraries\TestSoftSerialInclude/TestSoftSerialInclude.cpp:5: undefined reference to `NewSoftSerial::NewSoftSerial(unsigned char, unsigned char)'

Anybody an Idea what I do wrong?

Have you installed NewSoftSerial in the correct location?

  • Brian

That indeed turned out the to be the problem. All the newsoftserial files must be placed in the library directory I am using. Now it works :)

Thanks for your reply Brian.