Page 1 of 1
subscribeEvent problem after VS2003 -> VS2005 upgrade
Posted: Thu May 11, 2006 21:14
by gojca
Hi,
After converting existing solution from VS7.1 to VS8 and successfully rebuilding all projects, every time after running the code I get an error on each subscribeEvent() method call. Everything else is working just fine (after commenting all subscribeEvent calls).
I have tried replacing VS2003 C++ CEGUI SDK dlls with VS2005 SDK dlls, even tried building CEGUI 0.4.1 source with VS2005 (debug and retail), combination of libs/dlls (oh so many different combos now!), and subscribeEvent will simply not work in VS8... Same code but in VS7.1 everything works ok! Any ideas? Help?
TY!
Posted: Fri May 12, 2006 12:23
by Elrinth
I have the same problem...
When I used 0.4.1 of cegui it worked perfectly.. but when migrating to 0.5 subscribeEvent stopped working.. i'm in the same boat as you my man.. please tell me if you come up with anything... oh... and i've used VS2005 all the time...
i'm getting access violation on the subscribeevent call..
Posted: Wed May 17, 2006 13:14
by Elrinth
I succeeded in using subscribe event now...
some libs, dlls or headers from visual studio 2002 and 2003 was being used...
To get things working I removed vs2002 and 2003 from my computer.
Posted: Sun May 21, 2006 14:10
by gojca
Well I'm happy for you... Only thing is, on this computer I have never installed VS2003, only VS2005 so I do not have anything to uninstall. Project was created in VS2003 but on another machine. My problem with subscribeEvent under VS2005 remains
Posted: Mon May 22, 2006 13:39
by Elrinth
ok...
make sure the function looks like this:
bool classname::functioname( const EventArgs &args )
{
return true;
}
and the call should be like this:
void classname::test()
{
WindowManager::getSingleton().getWindow("UrWindowName")->subscribeEvent( PushButton::EventClicked, SubscriberSlot(&classname::functionname, this) );
}
Then make sure your includes and library folders are correct under Visual Studio Project VC++ Directories...
Make sure nothing from 2003, 2002 is there
Make sure you use the correct header and libraries from cegui.. delete everything else so that u don't include wrong files...
if u do this, u should be good to go
Posted: Sat Jun 24, 2006 07:08
by billconan
Elrinth wrote:ok...
make sure the function looks like this:
bool classname::functioname( const EventArgs &args )
{
return true;
}
and the call should be like this:
void classname::test()
{
WindowManager::getSingleton().getWindow("UrWindowName")->subscribeEvent( PushButton::EventClicked, SubscriberSlot(&classname::functionname, this) );
}
Then make sure your includes and library folders are correct under Visual Studio Project VC++ Directories...
Make sure nothing from 2003, 2002 is there
Make sure you use the correct header and libraries from cegui.. delete everything else so that u don't include wrong files...
if u do this, u should be good to go
i have the same problem, i use v0.4.1 and vs2005. i never installed 2003 or 2002 in this machine. i got access violation.
the call back in my code is not in a class:
Code: Select all
theMainFrame->subscribeEvent(FrameWindow::EventCloseClicked, &allOver);
and this is the call back:
Code: Select all
bool allOver(const CEGUI::EventArgs& e)
{
exit(0);
return true;
}