Hi, I got some problem that I just can't fix!
I have the following class that is compiled into DLL
/** Abstract application interface.
*/
class SKGE_API Application{
protected:
//Render::RenderDevice* m_RenderDevice; /**< Render device. */
/** Input handler.
*/
//virtual void handleInput() = 0;
public:
/** Create application
*/
virtual void create() = 0;
/** Destroy application.
*/
//virtual void destroy() = 0;
/** Run application.
*/
//virtual void run() = 0;
};
(includes, header guards and namespaces omitted)
SKGE_API is defined as __declspec(dllexport) for library, and __declspec(dllimport) for the EXE
This is in the EXE file:
class Demo1: public Application{
private:
bool running;
public:
void create(){
}
};
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){
Demo1 app;
app.create();
/*app.run();
app.destroy();*/
return 0;
}
Or in short, there is an abstract class in the DLL from whom I inherit another class in the EXE, this is the error I got:
Error 1 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall skge::Application::Application(void)"
(__imp_??0Application@skge@@QAE@XZ) referenced in function "public: __thiscall
Demo1::Demo1(void)" (??0Demo1@@QAE@XZ) main.obj Demo1
Error 2 fatal error LNK1120: 1 unresolved externals
C:\Documents and Settings\Dmitri\My Documents\Visual Studio 2008\Projects
\Skge\Debug\Demo1.exe 1 Demo1
I tried everything :(
Where I wrong?
Please don't mark threads 'solved' on this forum.
[Edited by - jpetrie on June 8, 2009 10:04:25 AM]