to go a bit further into the SDK stuff, I'm trying to make use of classes that are on some different .h and .cpp files
the main files :
filter.h
filter.cpp
the externals :
delay.h
delay.cpp
all the files are inside the same folder.
so, on filter.h
#include "delay.h"
...
// parameters events
Delay*m_delay1;
on filter.cpp
// constructor
filter::filter()
{
const int length = 480;
m_delay1 = new Delay (length);
}
// destructor
filter::~filter()
{
delete m_delay1;
}
on delay.h
// Audio delay class
class Delay
{
public:
// Constructor
Delay(
int size // Size of delay (expressed in samples)
);
//Destructor
~Delay();
and on delay.cpp :
#include "delay.h"
//---------------------------------------------------------------------------------------
// Delay
// Constructor
Delay::Delay(
int size // Size of delay (expressed in samples)
)
{
//Initialize values
m_size = size;
m_read = 0;
m_write = size - 1;
//Ensure that initial sample values at buffer are 0.0f
m_buffer = new float[m_size];
for (int i = 0; i<size; i++)
{
m_buffer = 0.0f;
}
}
//Destructor
Delay::~Delay()
{
delete[] m_buffer;
}
and I get this error as soon as I add "m_delay1 = new Delay (length);" in filter.cpp
Error LNK2019 unresolved external symbol "public: __thiscall Delay::Delay(int)" (??0Delay@@QAE@H@Z) referenced in function "public: __thiscall filter::filter(void)" (??0filter@@QAE@XZ) allpass C:0Hollyhockpersolivardeveloppement USINESDK HH2 6modules olilab31 allpass filterfilter.obj 1
thank you for your help...
