[SOLVED]Can't suscribe event? Font not found in collection?

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

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

[SOLVED]Can't suscribe event? Font not found in collection?

Postby DozyHole » Tue Mar 22, 2011 23:38

Hi, I have had some success getting started via the various information around the site, I have also successfully ran alot of the examples so my issues are likely to be not setting something up properly in my own project:

I get an unhandled exception trying to Suscribe an event to a button, without trying to suscribe, it shows up and everything seems to be fine:

Code: Select all

#include "CEGUI.h"
#include "RendererModules/Direct3D9/CEGUIDirect3D9Renderer.h"
#include <CEGUIDefaultResourceProvider.h>
//#include <CEGUIExpatParser.h>
//#include <CEGUIExpatParserModule.h>

// Dark GDK - The Game Creators - www.thegamecreators.com

// the wizard has created a very simple 3D project that uses Dark GDK
// it can be used as a starting point in making your own 3D games

// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#pragma comment(lib, "CEGUIBase_d.lib")
#pragma comment(lib, "CEGUIDirect3D9Renderer_d.lib")


CEGUI::Window *gJumpBtnWindow = NULL;

class OurPlayer
{
public:
   OurPlayer()
    {
        RegisterForEvents();
    };
    bool Jump(const CEGUI::EventArgs& /*e*/){
        return true;
   };       
private:
    void RegisterForEvents()
    {
        //Unhandled exception here:
        gJumpBtnWindow->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&OurPlayer::Jump,this));
    };
};


// the main entry point for the application is this function
void DarkGDK ( void )
{
    using namespace CEGUI;

   //CEGUI::Direct3D9Renderer* myRenderer =
   //   new CEGUI::Direct3D9Renderer( dbGetDirect3DDevice());

   CEGUI::Direct3D9Renderer::bootstrapSystem(dbGetDirect3DDevice());
    DefaultResourceProvider* rp = static_cast<DefaultResourceProvider*>(
   CEGUI::System::getSingleton().getResourceProvider());
 
   rp->setResourceGroupDirectory("schemes", "datafiles/schemes/");
   rp->setResourceGroupDirectory("imagesets", "datafiles/imagesets/");
   rp->setResourceGroupDirectory("fonts", "datafiles/fonts/");
   rp->setResourceGroupDirectory("layouts", "datafiles/layouts/");
   rp->setResourceGroupDirectory("looknfeels", "datafiles/looknfeel/");
   rp->setResourceGroupDirectory("lua_scripts", "datafiles/lua_scripts/");
   // set the default resource groups to be used
   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");
      
   SchemeManager::getSingleton().create("TaharezLook.scheme");
    CEGUI::FontManager::getSingleton().create("DejaVuSans-10.font");

   try{   
       System::getSingleton().setDefaultFont( "DejaVuSans-10.font" );
      //System::getSingleton().setDefaultFont( "Commonwealth-10" );
       System::getSingleton().setDefaultMouseCursor( "TaherezLook", "MouseArrow" );
      // System::getSingleton().setDefaultTooltip( "TaherezLook/Tooltip" );
   }
    catch(CEGUI::Exception& e)
    {
        MessageBox(0, e.getMessage().c_str(), "CEGUI Exception", MB_OK);
    }

    WindowManager& wmgr = WindowManager::getSingleton();
    Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
    System::getSingleton().setGUISheet( myRoot );

    FrameWindow* fWnd = (FrameWindow*)wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow" );
    myRoot->addChildWindow( fWnd );

    // position a quarter of the way in from the top-left of parent.
    fWnd->setPosition( UVector2( UDim( 0.25f, 0 ), UDim( 0.25f, 0 ) ) );

    // set size to be half the size of the parent
    fWnd->setSize( UVector2( UDim( 0.5f, 0 ), UDim( 0.5f, 0 ) ) );
    fWnd->setText( "Hello World!" );

   gJumpBtnWindow = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/Button","JumpPushButton");  // Create Window
   gJumpBtnWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0.75,0),CEGUI::UDim(0.50,0)));
   gJumpBtnWindow->setSize(CEGUI::UVector2(CEGUI::UDim(0,70),CEGUI::UDim(0,20)));
   gJumpBtnWindow->setText("Jump!");
    
   CEGUI::System::getSingleton().getGUISheet()->addChildWindow(gJumpBtnWindow); 
   
   //Unhandled exception when trying to register for events
   OurPlayer *player1 = new OurPlayer();





Another thing to note is I catch some exceptions in the catch block:
"NamedXMLResourceManager::get: No object of type 'Font' named 'DejaVuSans-10.font' is present in the collection."

I checked the folder and that file is there, I must admit I have never used XML before. Perhaps these issues are related.

Here is the log:

Code: Select all

22/03/2011 23:30:54 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
22/03/2011 23:30:54 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
22/03/2011 23:30:54 (Std)    +                          (http://www.cegui.org.uk/)                         +
22/03/2011 23:30:54 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

22/03/2011 23:30:54 (Std)    CEGUI::Logger singleton created. (0D7EFE78)
22/03/2011 23:30:54 (Std)    
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    * Important:                                                                   *
22/03/2011 23:30:54 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
22/03/2011 23:30:54 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
22/03/2011 23:30:54 (Std)    *     support being given; please do not waste our time.                       *
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    ---- Version 0.7.5 (Build: Nov 19 2010 Debug Microsoft Windows MSVC++ 9.0 32 bit) ----
22/03/2011 23:30:54 (Std)    ---- Renderer module is: CEGUI::Direct3D9Renderer - Official Direct3D 9 based 2nd generation renderer module. ----
22/03/2011 23:30:54 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
22/03/2011 23:30:54 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
22/03/2011 23:30:54 (Std)    ---- Scripting module is: None ----
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
22/03/2011 23:30:54 (Std)    ********************************************************************************
22/03/2011 23:30:54 (Std)    
22/03/2011 23:30:54 (Std)    ---- Begining CEGUI System initialisation ----
22/03/2011 23:30:54 (Std)    CEGUI::ImagesetManager singleton created (0D7F30B0)
22/03/2011 23:30:54 (Std)    CEGUI::FontManager singleton created. (0D7F3398)
22/03/2011 23:30:54 (Std)    CEGUI::WindowFactoryManager singleton created
22/03/2011 23:30:54 (Std)    CEGUI::WindowManager singleton created (0D7E34E0)
22/03/2011 23:30:54 (Std)    CEGUI::SchemeManager singleton created. (0D7F3EB0)
22/03/2011 23:30:54 (Std)    CEGUI::MouseCursor singleton created. (0D7ED7E8)
22/03/2011 23:30:54 (Std)    CEGUI::GlobalEventSet singleton created. (0D7E2AF8)
22/03/2011 23:30:54 (Std)    CEGUI::AnimationManager singleton created (0D7ECA28)
22/03/2011 23:30:54 (Std)    CEGUI::WidgetLookManager singleton created. (0D7F4598)
22/03/2011 23:30:54 (Std)    CEGUI::WindowRendererManager singleton created (0D7F4840)
22/03/2011 23:30:54 (Std)    CEGUI::RenderEffectManager singleton created (0D7F4980)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'DefaultWindow' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'DefaultWindow' windows added. (0D7F4B38)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'DragContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'DragContainer' windows added. (0D7F4D38)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'ScrolledContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'ScrolledContainer' windows added. (0D7F4F40)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'ClippedContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'ClippedContainer' windows added. (0D7F5148)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Checkbox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Checkbox' windows added. (0D7F5358)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/PushButton' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/PushButton' windows added. (0D7F5570)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/RadioButton' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/RadioButton' windows added. (0D7F5730)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Combobox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Combobox' windows added. (0D7F5950)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ComboDropList' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ComboDropList' windows added. (0D7F5B10)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Editbox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Editbox' windows added. (0D7F5CD0)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/FrameWindow' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/FrameWindow' windows added. (0D7F5F00)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ItemEntry' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ItemEntry' windows added. (0D7F60C0)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Listbox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Listbox' windows added. (0D7F6280)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ListHeader' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ListHeader' windows added. (0D7F6440)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ListHeaderSegment' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (0D7F6600)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Menubar' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Menubar' windows added. (0D7F6DA0)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/PopupMenu' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/PopupMenu' windows added. (0D7F6860)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/MenuItem' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/MenuItem' windows added. (0D7F6B60)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/MultiColumnList' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/MultiColumnList' windows added. (0D7F6F60)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/MultiLineEditbox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (0D7F7120)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ProgressBar' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ProgressBar' windows added. (0D7F7390)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ScrollablePane' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ScrollablePane' windows added. (0D7F7550)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Scrollbar' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Scrollbar' windows added. (0D7F7710)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Slider' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Slider' windows added. (0D7F78D0)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Spinner' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Spinner' windows added. (0D7F7A90)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/TabButton' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/TabButton' windows added. (0D7F7C50)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/TabControl' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/TabControl' windows added. (0D7F7E10)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Thumb' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Thumb' windows added. (0D7F7FD0)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Titlebar' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Titlebar' windows added. (0D7F8190)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Tooltip' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Tooltip' windows added. (0D7F8438)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/ItemListbox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/ItemListbox' windows added. (0D7F85F8)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/GroupBox' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/GroupBox' windows added. (0D7F87B8)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'CEGUI/Tree' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'CEGUI/Tree' windows added. (0D7F8978)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'HorizontalLayoutContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'HorizontalLayoutContainer' windows added. (0D7F8B38)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'VerticalLayoutContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'VerticalLayoutContainer' windows added. (0D7F8DC8)
22/03/2011 23:30:54 (Std)    Created WindowFactory for 'GridLayoutContainer' windows.
22/03/2011 23:30:54 (Std)    WindowFactory for 'GridLayoutContainer' windows added. (0D7F8F88)
22/03/2011 23:30:54 (Std)    Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
22/03/2011 23:30:54 (Std)    CEGUI::System singleton created. (0D7EFAA8)
22/03/2011 23:30:54 (Std)    ---- CEGUI System initialisation completed ----
22/03/2011 23:30:54 (Std)    
22/03/2011 23:30:54 (Std)    Started creation of Scheme from XML specification:
22/03/2011 23:30:54 (Std)    ---- CEGUI GUIScheme name: TaharezLook
22/03/2011 23:30:54 (Std)    Started creation of Imageset from XML specification:
22/03/2011 23:30:54 (Std)    ---- CEGUI Imageset name: TaharezLook
22/03/2011 23:30:54 (Std)    ---- Source texture file: TaharezLook.tga in resource group: (Default)
22/03/2011 23:30:54 (Std)    Started creation of Font from XML specification:
22/03/2011 23:30:54 (Std)    ---- CEGUI font name: DejaVuSans-10
22/03/2011 23:30:54 (Std)    ----       Font type: FreeType
22/03/2011 23:30:54 (Std)    ----     Source file: DejaVuSans.ttf in resource group: (Default)
22/03/2011 23:30:54 (Std)    ---- Real point size: 10
22/03/2011 23:30:55 (Std)    ===== Falagard 'root' element: look and feel parsing begins =====
22/03/2011 23:30:56 (Std)    ===== Look and feel parsing completed =====
22/03/2011 23:30:56 (Std)    No window renderer factories specified for module 'CEGUIFalagardWRBase' - adding all available factories...
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Button' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Button' added. (12049D48)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Default' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Default' added. (1205A510)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Editbox' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Editbox' added. (0D81EE20)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/FrameWindow' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/FrameWindow' added. (11FA2448)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ItemEntry' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ItemEntry' added. (1206F718)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ListHeader' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ListHeader' added. (11F99EC8)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ListHeaderSegment' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ListHeaderSegment' added. (0D8277B8)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Listbox' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Listbox' added. (0D810330)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Menubar' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Menubar' added. (1205BA08)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/MenuItem' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/MenuItem' added. (1205FA78)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/MultiColumnList' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/MultiColumnList' added. (11FA0BC0)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/MultiLineEditbox' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/MultiLineEditbox' added. (12014748)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/PopupMenu' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/PopupMenu' added. (120807C8)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ProgressBar' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ProgressBar' added. (12014820)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ScrollablePane' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ScrollablePane' added. (12082D40)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Scrollbar' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Scrollbar' added. (12082F00)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Slider' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Slider' added. (120830C0)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Static' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Static' added. (12083280)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/StaticImage' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/StaticImage' added. (12083440)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/StaticText' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/StaticText' added. (0D82F5F0)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/SystemButton' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/SystemButton' added. (0D82F7B0)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/TabButton' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/TabButton' added. (0D82F970)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/TabControl' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/TabControl' added. (0D82FB30)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Titlebar' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Titlebar' added. (0D82FCF0)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ToggleButton' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ToggleButton' added. (0D7F9C18)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Tooltip' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Tooltip' added. (0D7F9DD8)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/ItemListbox' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/ItemListbox' added. (0D7F9F98)
22/03/2011 23:30:56 (Std)    Created WindowRendererFactory for 'Falagard/Tree' WindowRenderers.
22/03/2011 23:30:56 (Std)    WindowRendererFactory 'Falagard/Tree' added. (0D7FA158)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Button' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/Button' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Checkbox' using base type 'CEGUI/Checkbox', window renderer 'Falagard/ToggleButton' Look'N'Feel 'TaharezLook/Checkbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ImageButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/ImageButton' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/RadioButton' using base type 'CEGUI/RadioButton', window renderer 'Falagard/ToggleButton' Look'N'Feel 'TaharezLook/RadioButton' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/FrameWindow' using base type 'CEGUI/FrameWindow', window renderer 'Falagard/FrameWindow' Look'N'Feel 'TaharezLook/FrameWindow' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Titlebar' using base type 'CEGUI/Titlebar', window renderer 'Falagard/Titlebar' Look'N'Feel 'TaharezLook/Titlebar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/SystemButton' using base type 'CEGUI/PushButton', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/Button' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Editbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'TaharezLook/Editbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/MultiLineEditbox' using base type 'CEGUI/MultiLineEditbox', window renderer 'Falagard/MultiLineEditbox' Look'N'Feel 'TaharezLook/MultiLineEditbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Menubar' using base type 'CEGUI/Menubar', window renderer 'Falagard/Menubar' Look'N'Feel 'TaharezLook/Menubar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/PopupMenu' using base type 'CEGUI/PopupMenu', window renderer 'Falagard/PopupMenu' Look'N'Feel 'TaharezLook/PopupMenu' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/MenuItem' using base type 'CEGUI/MenuItem', window renderer 'Falagard/MenuItem' Look'N'Feel 'TaharezLook/MenuItem' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/AlternateProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/AltProgressBar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ProgressBar' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/ProgressBar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/VUMeter' using base type 'CEGUI/ProgressBar', window renderer 'Falagard/ProgressBar' Look'N'Feel 'TaharezLook/VUMeter' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/VerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/VerticalScrollbar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/HorizontalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/HorizontalScrollbar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/VerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/VerticalScrollbarThumb' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/HorizontalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/HorizontalScrollbarThumb' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbar' using base type 'CEGUI/Scrollbar', window renderer 'Falagard/Scrollbar' Look'N'Feel 'TaharezLook/LargeVerticalScrollbar' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/LargeVerticalScrollbarThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/LargeVerticalScrollbarThumb' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/TabButton' using base type 'CEGUI/TabButton', window renderer 'Falagard/TabButton' Look'N'Feel 'TaharezLook/TabButton' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/TabControl' using base type 'CEGUI/TabControl', window renderer 'Falagard/TabControl' Look'N'Feel 'TaharezLook/TabControl' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/TabContentPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/TabContentPane' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/TabButtonPane' using base type 'DefaultWindow', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/TabButtonPane' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ComboDropList' using base type 'CEGUI/ComboDropList', window renderer 'Falagard/Listbox' Look'N'Feel 'TaharezLook/ComboDropList' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ComboEditbox' using base type 'CEGUI/Editbox', window renderer 'Falagard/Editbox' Look'N'Feel 'TaharezLook/ComboEditbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Combobox' using base type 'CEGUI/Combobox', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/Combobox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Listbox' using base type 'CEGUI/Listbox', window renderer 'Falagard/Listbox' Look'N'Feel 'TaharezLook/Listbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ListHeader' using base type 'CEGUI/ListHeader', window renderer 'Falagard/ListHeader' Look'N'Feel 'TaharezLook/ListHeader' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ListHeaderSegment' using base type 'CEGUI/ListHeaderSegment', window renderer 'Falagard/ListHeaderSegment' Look'N'Feel 'TaharezLook/ListHeaderSegment' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/MultiColumnList' using base type 'CEGUI/MultiColumnList', window renderer 'Falagard/MultiColumnList' Look'N'Feel 'TaharezLook/MultiColumnList' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Slider' using base type 'CEGUI/Slider', window renderer 'Falagard/Slider' Look'N'Feel 'TaharezLook/Slider' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/SliderThumb' using base type 'CEGUI/Thumb', window renderer 'Falagard/Button' Look'N'Feel 'TaharezLook/SliderThumb' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ScrollablePane' using base type 'CEGUI/ScrollablePane', window renderer 'Falagard/ScrollablePane' Look'N'Feel 'TaharezLook/ScrollablePane' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Spinner' using base type 'CEGUI/Spinner', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/Spinner' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Tooltip' using base type 'CEGUI/Tooltip', window renderer 'Falagard/Tooltip' Look'N'Feel 'TaharezLook/Tooltip' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/StaticImage' using base type 'DefaultWindow', window renderer 'Falagard/StaticImage' Look'N'Feel 'TaharezLook/StaticImage' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/StaticText' using base type 'DefaultWindow', window renderer 'Falagard/StaticText' Look'N'Feel 'TaharezLook/StaticText' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ItemListbox' using base type 'CEGUI/ItemListbox', window renderer 'Falagard/ItemListbox' Look'N'Feel 'TaharezLook/ItemListbox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/ListboxItem' using base type 'CEGUI/ItemEntry', window renderer 'Falagard/ItemEntry' Look'N'Feel 'TaharezLook/ListboxItem' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/GroupBox' using base type 'CEGUI/GroupBox', window renderer 'Falagard/Default' Look'N'Feel 'TaharezLook/GroupBox' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Creating falagard mapping for type 'TaharezLook/Tree' using base type 'CEGUI/Tree', window renderer 'Falagard/Tree' Look'N'Feel 'TaharezLook/Tree' and RenderEffect ''. (0BFDC380)
22/03/2011 23:30:56 (Std)    Started creation of Font from XML specification:
22/03/2011 23:30:56 (Std)    ---- CEGUI font name: DejaVuSans-10
22/03/2011 23:30:56 (Std)    ----       Font type: FreeType
22/03/2011 23:30:56 (Std)    ----     Source file: DejaVuSans.ttf in resource group: (Default)
22/03/2011 23:30:56 (Std)    ---- Real point size: 10
22/03/2011 23:30:57 (Std)    ---- Returning existing instance of Font named 'DejaVuSans-10'.
22/03/2011 23:30:57 (Error)   CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\include\ceguinamedxmlresourcemanager.h(279) : NamedXMLResourceManager::get: No object of type 'Font' named 'DejaVuSans-10.font' is present in the collection.


Any help will be appreciated, the rendering library I use has no good options for a professional GUI, if I can get this working I can share with our community, we get requests for GUI options all the time.

Thanks.
Last edited by DozyHole on Fri Mar 25, 2011 17:19, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Can't suscribe event? and Font not found in collection?

Postby Kulik » Wed Mar 23, 2011 00:17

As for the font, the file the font is in is called DejaVuSans-10.font but the font itself is called DejaVuSans-10. That's the resource name the file creates when loading, so that's what you should use

So replace with this code:

Code: Select all

 try{   
       System::getSingleton().setDefaultFont( "DejaVuSans-10" );
      //System::getSingleton().setDefaultFont( "Commonwealth-10" );
       System::getSingleton().setDefaultMouseCursor( "TaherezLook", "MouseArrow" );
      // System::getSingleton().setDefaultTooltip( "TaherezLook/Tooltip" );
   }


With the subscribe exception, nothing really comes to mind, could you surround it with try catch and examine the exception? Weird that it doesn't show up in the log :-/

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Wed Mar 23, 2011 13:37

Hi Kulik,

Thanks for the response, and thanks for fixing the font issue, I also have trouble with the tooltip and mouse cursor but I'm not too concerned with that right now, I will brush up in the resource handler stuff as I mostly understand it but not sure how I know what resources are available, I am just cutting and pasting from tutorials at the moment.

Regarding the other issue, I tried a try-catch block but it didn't catch the exception, just got the same unhandled exception message.

A few issues I had before seemed to be caused by dlls I had not added to my project so I ended up just adding every dll I could find, could this be caused by a missing dll, or adding a wrong dll?

I will start a new project and just try to add any dlls that are required, making my project alot neater. The fact I can run all the samples makes me think I am missing something from my own project, once I have a neat and tidy project I can post what I have in my file structure and perhaps someone here will see if something is missing.

Thanks.

apam
Just popping in
Just popping in
Posts: 6
Joined: Sat Mar 19, 2011 03:33

Re: Can't suscribe event? and Font not found in collection?

Postby apam » Wed Mar 23, 2011 14:32

Having a look as requested :)

Could the problem be that you're registering the events inside the constructor? The examples I saw created the object, then registered the handler after.

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Wed Mar 23, 2011 14:43

Hi apam,

I have tried many ways to suscribe the events which all throw an exception, I just tried this:

Code: Select all

   OurPlayer *player1 = new OurPlayer();
    gJumpBtnWindow->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&OurPlayer::Jump,player1));

Same error, I have tried suscribing a global function also with same result.

Its good to have you here as we are probably using the exact same software, I am using VS2008 express, did you have to do anything special in regard to the DirectX version GDK uses? I was missing a dll(d3dx9_43 or something) so I downloaded the latest DX9 SDK (June 2010)and it fixed it, although my project is still linking to the GDK version(August 2007). Could this be causing the issue?

I know you can use later DirectX versions by making dummy multiplayer libs, did you have to do this?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Can't suscribe event? and Font not found in collection?

Postby Kulik » Wed Mar 23, 2011 15:22

Can you debug and set the debugger to break when exception is thrown? It may be std::bad_alloc or something nasty not even related to the event subscription...

AFAIK: subscribeEvent should never throw exceptions

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Wed Mar 23, 2011 15:45

Hi Kulik,

If I try to step through it I can only get this far:

Code: Select all

    // templatised constructors
    /*!
    \brief
        Creates a SubscriberSlot that is bound to a member function.
    */
    template<typename T>
    SubscriberSlot(bool (T::*function)(const EventArgs&), T* obj) :
        d_functor_impl(new MemberFunctionSlot<T>(function, obj))
    {}


Then there is no code available after that, the value in the 'function' parameter seems to be holding the correct function, the 'obj' says 'children could not be evaluated', I have no idea what this means?

apam
Just popping in
Just popping in
Posts: 6
Joined: Sat Mar 19, 2011 03:33

Re: Can't suscribe event? and Font not found in collection?

Postby apam » Wed Mar 23, 2011 15:46

I downloaded the CEGUI source and compiled it with the directx SDK DarkGDK uses. I'm also using VS2008 express.

I'm still a newbie at both DarkGDK and CEGUI, so don't know how much help I can be.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Can't suscribe event? and Font not found in collection?

Postby Jamarr » Wed Mar 23, 2011 15:53

If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Wed Mar 23, 2011 16:41

I downloaded the CEGUI source and compiled it with the directx SDK DarkGDK uses. I'm also using VS2008 express.

I'm still a newbie at both DarkGDK and CEGUI, so don't know how much help I can be.


Just knowing that you got it working has helped as I know I can get it to work, if what I'm trying now does not work I too will compile them with the correct DirectX version, I'm 'matty halewood' on the TGC forums by the way in case you are ever in there.

Perhaps posting the June 2007 DirectX compiled version on the GDK forum would help people, if it turns out to be that, I will do it if its OK with the author?


Did you try searching for and applying the solutions of those who had a similar problem?


Yeah, I searched all day yesterday before posting for help before I went to bed:)

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Can't suscribe event? and Font not found in collection?

Postby Kulik » Wed Mar 23, 2011 17:38

Jamarr's post reminded me that most of these problems were caused by lib/header mismatch in the past.. I suggest you triple check that you are using the right stuff :)

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Wed Mar 23, 2011 22:30

I think you're right, I'm suspecting its a conflict in DirectX versions.
I am trying to compile it myself but here is my issue now:)

I have ran the batch file, opened the solution and ran the CEGUIBase project in Debug_Static mode and then I end up with a CEGUIBase_Static_d.lib
I point Visual Studio to this location and try to run the project and get these errors:

Code: Select all

1>------ Build started: Project: CEGUI-Take2, Configuration: Debug Win32 ------
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class CEGUI::ResourceProvider * __thiscall CEGUI::System::getResourceProvider(void)const " (__imp_?getResourceProvider@System@CEGUI@@QBEPAVResourceProvider@2@XZ) referenced in function "void __cdecl DarkGDK(void)" (?DarkGDK@@YAXXZ)
1>Main.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 "void __cdecl DarkGDK(void)" (?DarkGDK@@YAXXZ)
1>Debug\CEGUI-Take2.exe : fatal error LNK1120: 2 unresolved externals
1>Build log was saved at "file://c:\Users\Matty\Desktop\CEGUI-Take2\CEGUI-Take2\Debug\BuildLog.htm"
1>CEGUI-Take2 - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


After a search it seems perhaps the dll's are not finding the lib, or perhaps because its because the lib is 'CEGUIBase_Static_d' and not 'CEGUIBase_d'. I tried to create the lib in debug mode and get:

Code: Select all

1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'freetype_D.lib'


A search brings up one post here but its in chinese or something:)
I'm completely new to alot of this, building libs and what not, so any help will be appreciated.

Thanks.

DozyHole
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Mar 22, 2011 23:22

Re: Can't suscribe event? and Font not found in collection?

Postby DozyHole » Thu Mar 24, 2011 14:19

Forget my most recent problems as I think they are mostly down to me downloading things from the wrong locations, probably searching for stuff too much when the links are on this forum:)

I will post back if building it myself fixed my original issue.


EDIT: No, I still get the same exception in the same place, it did fix another issue I noticed, my screen used to stop rendering under certain conditions but that is now fixed as I built with the DX9 version i was using.

I think I will go away and come back to this in a few days, I will probably try re-installing everything VC++, GDK and then build CEGUI again and see what happens.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Can't suscribe event? and Font not found in collection?

Postby Jamarr » Thu Mar 24, 2011 15:27

Kulik wrote:Jamarr's post reminded me that most of these problems were caused by lib/header mismatch in the past.. I suggest you triple check that you are using the right stuff


You know he might have eventually figured out my hint, right? You do not have to spoil everything! :wink:

DozyHole wrote:I'm suspecting its a conflict in DirectX versions.


Your version of DirectX should not have any affect on subscribing to CEGUI events as they are completely unrelated. Afaik, the only way an incompatible version of DirectX could be casually related to this issue is if DirectX was corrupting the memory CEGUI was residing in.

DozyHole wrote:I am trying to compile it myself


If you are just trying to get it "to work" then why are you compiling CEGUI? You may as well just use the precompiled SDK and precompiled dependencies. It is fine if you want to; it just seems like overkill to reinvent the wheel, so to speak.

DozyHole wrote:After a search it seems perhaps the dll's are not finding the lib, or perhaps because its because the lib is 'CEGUIBase_Static_d' and not 'CEGUIBase_d'.


You seem to have a misunderstanding here. The DLL's do not look for their own library. The linker uses the .LIB file associated with a DLL to resolve external symbols at link-time. In dynamic-linking, the name of the DLL is embedded into the compiled-code; when that code is executed it then looks for and loads the DLL as well as locates the relevant symbols/code within the DLL.

The name of the .LIB file is not particularly important. However in this case the static keyword denotes that particular .LIB does not have an associated DLL because the library should be statically, not dynamically, linked. In static-linking the code for relevant symbols is embedded into the compiled-code, so there is no need for the compiled-code to look for and load the DLL. That is difference between the static and non-static libraries.

I tried to create the lib in debug mode and get:

Code: Select all

CODE: SELECT ALL
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'freetype_D.lib'



That is because you have not pointed the linker to the dependencies folder/libraries. As CEGUI uses various third-party libraries, you need to link to these as well. You can find links to precompiled dependencies in the v0.7.5 Release thread.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Can't suscribe event? and Font not found in collection?

Postby Jamarr » Thu Mar 24, 2011 15:32

DozyHole wrote:I think they are mostly down to me downloading things from the wrong locations...I still get the same exception in the same place


You are most likely mixing different versions of CEGUI headers/libraries. If I were you, I would remove all traces of CEGUI from my system. Download the v0.7.5 precompiled SDK and dependencies only. And then try again.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 10 guests