I got the error below by using these as my main and class constructor.
#include<Process.h>
int main(int argc, char* argv[])
{
Process pr (0.01,0.0,argv[3],argv[4],argv[5]);
return 1;
}
and the process class header:
class Process
{
public:
Process();
Process(double BinSize,double Offset,const std::string& parameters,const std::string& TDBname,const std::string& DDBname);
virtual ~Process();
};
and the process class source:
Process::Process()
{
//ctor
}
Process::Process(double BinSize,double Offset,const std::string& TDBname,const std::string& DDBname,const std::string& parameters)
{
//ctor
cout<<TDBname;
}
but when I compiling the code by Ubuntu 12.10 I got:
main.cpp:(.text.startup+0xf7): undefined reference to `Process::Process(double, double, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
I have no idea where the hell this error coming from! Thank you in advance.