Dev C Project Undefined Reference

hay I am using dev c++ and I am having these errors.
[Linker error] undefined reference to `point::point(double, double)'
[Linker error] undefined reference to `point::tostring() const'
[Linker error] undefined reference to `point::point(double, double)'
[Linker error] undefined reference to `point::tostring() const'
[Linker error] undefined reference to `point::point(point const&)'
[Linker error] undefined reference to `point::tostring() const'
[Linker error] undefined reference to `point::operator=(point const&)'
[Linker error] undefined reference to `point::tostring() const'
[Linker error] undefined reference to `point::x() const'
[Linker error] undefined reference to `point::y() const'
[Linker error] undefined reference to `point::~point()'
[Linker error] undefined reference to `point::~point()'
[Linker error] undefined reference to `point::~point()'
[Linker error] undefined reference to `point::~point()'
[Linker error] undefined reference to `point::~point()'
[Linker error] undefined reference to `point::~point()'
32:2 C:Dev-Cppincludec++3.4.2backwardbackward_warning.h more undefined references to `point::~point()' follow
32:2 C:Dev-Cppincludec++3.4.2backwardbackward_warning.h ld returned 1 exit status
and my program is:
// program
#include<string.h>
using namespace std;
class point
{
public:
point(double=0.0,double=0.0);
point(const point&);
~point();
point& operator=(const point&);
double x() const;
double y() const;
string tostring() const;
protected:
double _x, _y;
};
int main()
{
point p0;
cout << 'p0 = ' << p0.tostring() << endl;
point p1(5,-2);
cout << 'p1 = ' << p1.tostring() << endl;
point p2=p1;
cout << 'p2 = ' << p2.tostring() << endl;
p0=p1;
cout << 'p0 = ' << p0.tostring() << endl;
cout << 'p0.x() = ' << p0.x() << endl;
cout << 'p0.y() = ' << p0.y() << endl;
system('pause');
}
// Please help me out of these errors.
// please donot refer me to any other post at all. I have read all of the post might be there would be answer in those posts but I am unable to understand that since I am a biggner. Please help me.
  1. C Undefined Reference
  2. C Project Downloads
  3. Undefined Reference To Vtable For

C Undefined Reference

P: 1
I have designed a package with several files, which is listed bellow
base.cpp & base.hpp - define the template class base
tree.cpp & tree.hpp - define the class tree derived from base<int>
client.cpp & client.hpp - define the class client derived from tree
main.cpp - the main function instantiate client and run
All these files are compiled successfully, but there's a linker error ' [Linker error] undefined reference to `base<int>::base_run()' '.
However, I have defined this function in base.cpp, and all .cpp files are added to the project. I use IDE Dev-C++ 4.9.9.2. I don't know why the linker cannot find this function. When I get ride of the template, then problem solved. But I really need the class 'base' to be a template class. When I use the template but melt all these files into one file, problem also solved. But I don't like that.
I have made the program to be very small (doing nothing, only shows the problems) and attached it with this note in the file problem_example.zip.
Can anybody tell me why this happen? what's wrong with template class?
thanks a lot
Attached Files
problem_example.zip (6.7 KB, 338 views)
Dev C Project Undefined Reference

C Project Downloads

Dev C Project Undefined Reference

Undefined Reference To Vtable For

Get latest updates about Open Source Projects, Conferences and News. Sign Up No, Thank you. I am currently having problem compiling my project in dev c, what i did was i accidently pressed 'Rebuild all' instead of compile and run and now it is showing this. Have a question about this project? Decimort vst free download mac. Sign up for a free GitHub account to open an issue and contact its maintainers and the community.