undefined reference to `vtable

Hello,
I am begginner in C++ and using 3rd party library.
When running make target on Xubuntu I get the following error:

[100%] Building CXX object CMakeFiles/step-22.dir/step-22.cc.o
Linking CXX executable step-22
CMakeFiles/step-22.dir/step-22.cc.o: In function `LeftChannelBoundaryValues':
/media/sf_Eclipse_Deal_II_sharedFolder/Eclipse_Win_workspace/ChannelFlowWithFlatPlateSource/src/LeftChannelBoundaryValues.h:19: undefined reference to `vtable for LeftChannelBoundaryValues'
CMakeFiles/step-22.dir/step-22.cc.o: In function `~LeftChannelBoundaryValues':
/media/sf_Eclipse_Deal_II_sharedFolder/Eclipse_Win_workspace/ChannelFlowWithFlatPlateSource/src/LeftChannelBoundaryValues.h:16: undefined reference to `vtable for LeftChannelBoundaryValues'
/media/sf_Eclipse_Deal_II_sharedFolder/Eclipse_Win_workspace/ChannelFlowWithFlatPlateSource/src/LeftChannelBoundaryValues.h:16: undefined reference to `vtable for LeftChannelBoundaryValues'
collect2: error: ld returned 1 exit status
make[6]: *** [step-22] Error 1
....

Here is the code of LeftChannelBoundaryValues.h:
#ifndef SRC_LEFTCHANNELBOUNDARYVALUES_H_
#define SRC_LEFTCHANNELBOUNDARYVALUES_H_

#include <deal.II/base/function.h>
using namespace dealii;

class LeftChannelBoundaryValues : public Function<2>
{
public:
LeftChannelBoundaryValues () : Function<2>(3) {}
virtual double value (const Point<2> &p, const unsigned int component = 0) const;
virtual void vector_value (const Point<2> &p, Vector<double> &value) const;
};

#endif /* SRC_LEFTCHANNELBOUNDARYVALUES_H_ */

and code of LeftChannelBoundaryValues.cpp:
#include "LeftChannelBoundaryValues.h"

LeftChannelBoundaryValues::LeftChannelBoundaryValues() {
// TODO Auto-generated constructor stub

}

LeftChannelBoundaryValues::~LeftChannelBoundaryValues() {
// TODO Auto-generated destructor stub
}

void LeftChannelBoundaryValues::vector_value (const Point<dim> &p,
Vector<double> &values) const
{
values(0) = 1; //u1=1
values(1) = 0; //u2=0
}

What could be the reason of this error?
Thank you.
1
2
3
4
5
6
7
8
LeftChannelBoundaryValues::LeftChannelBoundaryValues() {
// TODO Auto-generated constructor stub

}

LeftChannelBoundaryValues::~LeftChannelBoundaryValues() {
// TODO Auto-generated destructor stub
}
THose two functions are not actualy declared in class definition. Constructor one is actually tries to redefine already defined constructor.
I removed the above costructors it helped. Thank you!
Registered users can post here. Sign in or register to post.