Compiling problem - what am I missing?
Posted: Mon May 18, 2009 01:11
I'm trying to make a tool very similar to LayoutEditor for Multi Theft Auto : DM. It's a multi-player mod for GTA:San Andreas and uses your GUI system. I want to use CEGUI, their theme and export the GUI created for their Lua scripts.
So far, I've followed a really old tutorial on how to use OpenGL with MFC (can be found here). Now, I'm trying to render CEGUI in that OpenGL rendering window. I followed the first tutorial on your wiki but I seem to be missing something.
What I did was, added these 2 lines in my header file:
and these 2 where I create my OpenGL rendering window:
(of course myRenderer is defined in my class as CEGUI::OpenGLRenderer pointer)
When I try compiling I get 31 unresolved externals which are:
So what am I missing?
So far, I've followed a really old tutorial on how to use OpenGL with MFC (can be found here). Now, I'm trying to render CEGUI in that OpenGL rendering window. I followed the first tutorial on your wiki but I seem to be missing something.
What I did was, added these 2 lines in my header file:
Code: Select all
#include <CEGUI.h>
#include <openglrenderer.h>
and these 2 where I create my OpenGL rendering window:
Code: Select all
myRenderer = new CEGUI::OpenGLRenderer( 0 );
new CEGUI::System( myRenderer );
(of course myRenderer is defined in my class as CEGUI::OpenGLRenderer pointer)
When I try compiling I get 31 unresolved externals which are:
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::ResourceProvider * __thiscall CEGUI::Renderer::createResourceProvider(void)" (?createResourceProvider@Renderer@CEGUI@@UAEPAVResourceProvider@2@XZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CEGUI::OpenGLRenderer::getVertScreenDPI(void)const " (?getVertScreenDPI@OpenGLRenderer@CEGUI@@UBEIXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CEGUI::OpenGLRenderer::getHorzScreenDPI(void)const " (?getHorzScreenDPI@OpenGLRenderer@CEGUI@@UBEIXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CEGUI::OpenGLRenderer::getMaxTextureSize(void)const " (?getMaxTextureSize@OpenGLRenderer@CEGUI@@UBEIXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::Rect __thiscall CEGUI::OpenGLRenderer::getRect(void)const " (?getRect@OpenGLRenderer@CEGUI@@UBE?AVRect@2@XZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::Size __thiscall CEGUI::OpenGLRenderer::getSize(void)const " (?getSize@OpenGLRenderer@CEGUI@@UBE?AVSize@2@XZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall CEGUI::OpenGLRenderer::getHeight(void)const " (?getHeight@OpenGLRenderer@CEGUI@@UBEMXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual float __thiscall CEGUI::OpenGLRenderer::getWidth(void)const " (?getWidth@OpenGLRenderer@CEGUI@@UBEMXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CEGUI::OpenGLRenderer::isQueueingEnabled(void)const " (?isQueueingEnabled@OpenGLRenderer@CEGUI@@UBE_NXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::destroyAllTextures(void)" (?destroyAllTextures@OpenGLRenderer@CEGUI@@UAEXXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::destroyTexture(class CEGUI::Texture *)" (?destroyTexture@OpenGLRenderer@CEGUI@@UAEXPAVTexture@2@@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::Texture * __thiscall CEGUI::OpenGLRenderer::createTexture(void)" (?createTexture@OpenGLRenderer@CEGUI@@UAEPAVTexture@2@XZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::Texture * __thiscall CEGUI::OpenGLRenderer::createTexture(class CEGUI::String const &,class CEGUI::String const &)" (?createTexture@OpenGLRenderer@CEGUI@@UAEPAVTexture@2@ABVString@2@0@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::Texture * __thiscall CEGUI::OpenGLRenderer::createTexture(float)" (?createTexture@OpenGLRenderer@CEGUI@@UAEPAVTexture@2@M@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::setQueueingEnabled(bool)" (?setQueueingEnabled@OpenGLRenderer@CEGUI@@UAEX_N@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::clearRenderList(void)" (?clearRenderList@OpenGLRenderer@CEGUI@@UAEXXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::doRender(void)" (?doRender@OpenGLRenderer@CEGUI@@UAEXXZ)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::OpenGLRenderer::addQuad(class CEGUI::Rect const &,float,class CEGUI::Texture const *,class CEGUI::Rect const &,class CEGUI::ColourRect const &,enum CEGUI::QuadSplitMode)" (?addQuad@OpenGLRenderer@CEGUI@@UAEXABVRect@2@MPBVTexture@2@0ABVColourRect@2@W4QuadSplitMode@2@@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::EventSet::fireEvent(class CEGUI::String const &,class CEGUI::EventArgs &,class CEGUI::String const &)" (?fireEvent@EventSet@CEGUI@@UAEXABVString@2@AAVEventArgs@2@0@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefCounted __thiscall CEGUI::EventSet::subscribeScriptedEvent(class CEGUI::String const &,class CEGUI::String const &)" (?subscribeScriptedEvent@EventSet@CEGUI@@UAE?AV?$RefCounted@VBoundSlot@CEGUI@@@2@ABVString@2@0@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefCounted __thiscall CEGUI::EventSet::subscribeScriptedEvent(class CEGUI::String const &,unsigned int,class CEGUI::String const &)" (?subscribeScriptedEvent@EventSet@CEGUI@@UAE?AV?$RefCounted@VBoundSlot@CEGUI@@@2@ABVString@2@I0@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefCounted __thiscall CEGUI::EventSet::subscribeEvent(class CEGUI::String const &,class CEGUI::SubscriberSlot)" (?subscribeEvent@EventSet@CEGUI@@UAE?AV?$RefCounted@VBoundSlot@CEGUI@@@2@ABVString@2@VSubscriberSlot@2@@Z)
OpenGLControl.obj : error LNK2001: unresolved external symbol "public: virtual class CEGUI::RefCounted __thiscall CEGUI::EventSet::subscribeEvent(class CEGUI::String const &,unsigned int,class CEGUI::SubscriberSlot)" (?subscribeEvent@EventSet@CEGUI@@UAE?AV?$RefCounted@VBoundSlot@CEGUI@@@2@ABVString@2@IVSubscriberSlot@2@@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::~String(void)" (__imp_??1String@CEGUI@@QAE@XZ) referenced in function "public: void __thiscall COpenGLControl::Create(class CRect,class CWnd *)" (?Create@COpenGLControl@@QAEXVCRect@@PAVCWnd@@@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::System::System(class CEGUI::Renderer *,class CEGUI::ResourceProvider *,class CEGUI::XMLParser *,class CEGUI::ScriptModule *,class CEGUI::String const &,class CEGUI::String const &)" (__imp_??0System@CEGUI@@QAE@PAVRenderer@1@PAVResourceProvider@1@PAVXMLParser@1@PAVScriptModule@1@ABVString@1@4@Z) referenced in function "public: void __thiscall COpenGLControl::Create(class CRect,class CWnd *)" (?Create@COpenGLControl@@QAEXVCRect@@PAVCWnd@@@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::String::String(char const *)" (__imp_??0String@CEGUI@@QAE@PBD@Z) referenced in function "public: void __thiscall COpenGLControl::Create(class CRect,class CWnd *)" (?Create@COpenGLControl@@QAEXVCRect@@PAVCWnd@@@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CEGUI::OpenGLRenderer::OpenGLRenderer(unsigned int,class CEGUI::ImageCodec *)" (__imp_??0OpenGLRenderer@CEGUI@@QAE@IPAVImageCodec@1@@Z) referenced in function "public: void __thiscall COpenGLControl::Create(class CRect,class CWnd *)" (?Create@COpenGLControl@@QAEXVCRect@@PAVCWnd@@@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CEGUI::OpenGLRenderer::~OpenGLRenderer(void)" (__imp_??1OpenGLRenderer@CEGUI@@UAE@XZ) referenced in function "public: virtual void * __thiscall CEGUI::OpenGLRenderer::`scalar deleting destructor'(unsigned int)" (??_GOpenGLRenderer@CEGUI@@UAEPAXI@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CEGUI::System::~System(void)" (__imp_??1System@CEGUI@@UAE@XZ) referenced in function "public: virtual void * __thiscall CEGUI::System::`scalar deleting destructor'(unsigned int)" (??_GSystem@CEGUI@@UAEPAXI@Z)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall CEGUI::System::renderGUI(void)" (__imp_?renderGUI@System@CEGUI@@QAEXXZ) referenced in function "protected: void __thiscall COpenGLControl::OnPaint(void)" (?OnPaint@COpenGLControl@@IAEXXZ)
OpenGLControl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class CEGUI::System & __cdecl CEGUI::System::getSingleton(void)" (__imp_?getSingleton@System@CEGUI@@SAAAV12@XZ) referenced in function "protected: void __thiscall COpenGLControl::OnPaint(void)" (?OnPaint@COpenGLControl@@IAEXXZ)
So what am I missing?