INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{
try
{
Root *pRoot = new Root();
RenderSystem *pRenderSystem = new D3D9RenderSystem(hInst);
}
catch(Ogre::Exception &e)
{
MessageBox(
NULL, e.getFullDescription().c_str(), "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
}
}
The error is:
error LNK2019: unresolved external symbol "public: __thiscall Ogre::D3D9RenderSystem::D3D9RenderSystem(struct HINSTANCE__ *)" (??0D3D9RenderSystem@Ogre@@QAE@PAUHINSTANCE__@@@Z) referenced in function _WinMain@16
Path to the library for the RenderSystem is set, and I'm using the debug version.
You shouldn't create your own D3D9RenderSystem, as the plugin constructs itself on DLL loading. The way to set the rendersystem is through the ogre root object.