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
}