Original Post
Hi, i am trying to write an abstract class (within a dll). as far as i can tell i would say everything is correct but the compiler begs to differ... I get the following error: "Error 4 error LNK2019: unresolved external symbol "public: virtual bool __thiscall f3dLinList::UnloadFile(void *)" (?UnloadFile@f3dLinList@@UAE_NPAX@Z) referenced in function "public: __thiscall f3dLinList::~f3dLinList(void)" (??1f3dLinList@@QAE@XZ) f3dLinList.obj" i tried to recreate the error outside the project without success. the header of my abstract class looks like this everything works fine as long as i dont use the virtual functions in the f3dLinList class. if i try to use them i get the described error. the derived class has both functions. i hope i made myself clear as english is not my native language. mfg flery
#pragma once
#include "f3dDefault.h"
struct f3dapi f3dLinListElem {
f3dLinListElem* pPrevious;
char cFilename[255];
void* pContent;
unsigned int uiRefCount;
f3dLinListElem* pNext;
};
// MAKE ABSTRACT
class f3dapi f3dLinList
{
public:
f3dLinList(void);
~f3dLinList(void);
bool Add(char* inc_cFilename);
void* Remove(char* inc_cFilename);
f3dLinListElem* Search(char* inc_cFilename);
void DebugPrint();
virtual void* LoadFile(char* inc_cFilename) = 0;
virtual bool UnloadFile(void* pFile) = 0;
private:
unsigned int uiElemCount;
f3dLinListElem* pCurrentElem;
f3dLinListElem* pFirstElem;
f3dLinListElem* pLastElem;
};