Basically, when the compiler tries to link this stuff into a "simpletest" executable (the simpletest.cpp with a main isn't included but I can if needed) it says it can't reference the constructor of the parent class.
I never call the constructor of the parent class because it's a virtual class, so I am at a loss. Any advice?
Code:
//Device.hpp
class Device
{
public:
Device();
virtual DevErrors DevCreateContext(const char*) = 0;
virtual void DevDeleteContext() = 0;
virtual DevErrors DevPrep(Graph **graph, int type) = 0;
virtual DevErrors DevPrep(Graph **graph, const char *str, int type) = 0;
virtual DevErrors DevConfigure(Graph *graph) = 0;
virtual DevErrors DevInvoke(const DevCallInfo *callinfo, DevGroupFlags flags) = 0;
};
//SimDevice.hpp
#include "Device.hpp"
class SimDevice : public Device
{
public:
SimDevice();
DevErrors DevCreateContext(const char*);
void DevDeleteContext();
DevErrors DevPrep(Graph **graph, int type);
DevErrors DevPrep(Graph **graph, const char *str, int type);
DevErrors DevConfigure(Graph *graph);
DevErrors DevInvoke(const DevCallInfo *callinfo, DevGroupFlags flags);
~SimDevice();
private:
DevContextInfo info;
DevContextResult result;
};
//SimDevice.cpp
#include "SimDevice.hpp"
SimDevice::SimDevice() // Compiler is saying this line has undefined reference to `Device::Device()'
{
/* Do constructor stuff. */
}