Verbatim Hello World Code Crashes
Posted: Fri Dec 30, 2011 22:49
I'm currently building an image analysis program using OpenCV for video decoding and some analysis, OGRE for display, and CEGUI for the UI. I'm currently just attempting to get the hello world code found on the wiki here:
On the line:
I get the following error message:
I'm aware of what what the stack pointer is, how calling conventions work, etc, so I'm assuming that this is either an internal error with CEGUI or there's some issue with how my project is set up, since I'm not passing any function pointers around.
I am using:
Any help would be greatly appreciated.
Code: Select all
using namespace CEGUI;
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!");
On the line:
Code: Select all
FrameWindow* fWnd = (FrameWindow*)wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow" );
I get the following error message:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
I'm aware of what what the stack pointer is, how calling conventions work, etc, so I'm assuming that this is either an internal error with CEGUI or there's some issue with how my project is set up, since I'm not passing any function pointers around.
I am using:
- Visual Studio 2010
- Multi-threaded Debug DLL (/MDd)
- Precompiled OGRE libraries from the latest stable release, OGRE 1.7.3 SDK for Visual C++ .Net 2010 (32-bit)
- Precompiled CEGUI libraries from the CEGUI 0.7.5 Binary Downloads for Microsoft Visual C++ 2010 downloads section
Any help would be greatly appreciated.