[SOLVED] Undefined references with CEGUI 8.2

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Neckara
Just popping in
Just popping in
Posts: 11
Joined: Sun May 12, 2013 07:44

[SOLVED] Undefined references with CEGUI 8.2

Postby Neckara » Sun Dec 01, 2013 20:07

Hello,

I try to use CEGUI 8.2 but I have some undefined references for :
- CEGUI::Imageset::d_defaultResourceGroup ;
- CEGUI::IrrlichtRender::bootstrapSystem ;

But I link with :
-lCEGUIBase-0
-lCEGUIIrrlichtRenderer-0
-lCEGUILuaScriptModule-0

And the link works because without I have some others undefined references.

My current code :

Code: Select all

class CIrrEngine
        {
        public:
            CIrrEngine();
            ~CIrrEngine(void);

            void launch(const std::string &);
            void loadRessources(const std::string & path);
        private:
            irr::IrrlichtDevice * m_device;
            CEGUI::LuaScriptModule &  m_luaModule;
            CEGUI::IrrlichtRenderer & m_renderer;
            CEGUI::System * m_system;
        };


Code: Select all

 CIrrEngine::CIrrEngine()
            : m_device( irr::createDevice(irr::video::EDT_OPENGL,
                                          irr::core::dimension2d<irr::u32>(0,0), 16,
                                          false, false, true, 0 ) ),
              m_luaModule( CEGUI::LuaScriptModule::create() ),
              m_renderer( CEGUI::IrrlichtRenderer::bootstrapSystem(*m_device) ),
              m_system( CEGUI::System::getSingletonPtr() )
        {
            m_system->setScriptingModule(&m_luaModule);
        }

        CIrrEngine::~CIrrEngine(void)
        {
            CEGUI::IrrlichtRenderer::destroySystem();
            CEGUI::LuaScriptModule::destroy(m_luaModule);

            m_device->drop();
        }

        void CIrrEngine::launch(const std::string & file)
        {
            //m_luaModule.executeScriptFile(file, "lua_scripts");
            m_luaModule.executeString("local player;\n"
                                      "local myRoot;");
        }

        void CIrrEngine::loadRessources(const std::string & path)
        {
            CEGUI::DefaultResourceProvider * rp = \
                static_cast<CEGUI::DefaultResourceProvider*>(m_system->getResourceProvider());
            rp->setResourceGroupDirectory("schemes", path + "schemes/");
            rp->setResourceGroupDirectory("imagesets", path + "imagesets/");
            rp->setResourceGroupDirectory("fonts", path + "fonts/");
            rp->setResourceGroupDirectory("layouts", path + "layouts/");
            rp->setResourceGroupDirectory("looknfeels", path + "looknfeel/");
            rp->setResourceGroupDirectory("lua_scripts", path + "lua_scripts/");

            CEGUI::Imageset::setDefaultResourceGroup("imagesets");
            CEGUI::Font::setDefaultResourceGroup("fonts");
            CEGUI::Scheme::setDefaultResourceGroup("schemes");
            CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
            CEGUI::WindowManager::setDefaultResourceGroup("layouts");
            CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");
        }

Neckara
Just popping in
Just popping in
Posts: 11
Joined: Sun May 12, 2013 07:44

Re: Undefined references with CEGUI 8.2

Postby Neckara » Sun Dec 01, 2013 20:27

It seems I used old header names so my IDE took the old CEGUI files.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 19 guests