Page 1 of 1

Using TinyXML and CEGUI together in an application

Posted: Sat Nov 26, 2005 14:17
by Ceacy
Hi,
I'm trying to load XML files inside my application : in order to do this, I downloaded TinyXML sources and added them to my project.
Everything compiles fine, without any error, but when i run the executable, CEGUI::SchemeManager::getSingleton().loadScheme() causes a segfault (before i added tinyxml, it worked).
I finally (after some tests) understood that having tinyxml twice (in the CEGUI lib and in my src dir) wasn't possible. But i still want to use TinyXML classes : how can i do it ?

Thanks,
Ceacy.

Re: Using TinyXML and CEGUI together in an application

Posted: Sat Nov 26, 2005 15:32
by Exsortis
Ceacy wrote:
Everything compiles fine, without any error, but when i run the executable, CEGUI::SchemeManager::getSingleton().loadScheme() causes a segfault (before i added tinyxml, it worked).
I finally (after some tests) understood that having tinyxml twice (in the CEGUI lib and in my src dir) wasn't possible.


Actually, it is possible to have it both places: I'm doing the same thing myself. Have you run your program through a debugger to see why it's segfaulting at loadScheme()?

-E

Re: Using TinyXML and CEGUI together in an application

Posted: Sat Nov 26, 2005 15:34
by lindquist
There was some problems with the bundled tinyxml. A patch has been applied that puts tinyxml inside it's own namespace. This could fix your problems. not sure though.
If you do a CVS update on your cegui_mk2 directory you will get these fixes plus many more.

Or wait for the 0.4.1 release which CE is finishing up right now. So it should be out during the next few days.

Re: Using TinyXML and CEGUI together in an application

Posted: Mon Nov 28, 2005 22:14
by Ceacy
I finally put "my" tinyxml in a namespace, so the problem disappeared ;)
Thanks !

Re: Using TinyXML and CEGUI together in an application

Posted: Tue Nov 29, 2005 06:29
by Exsortis
Ceacy wrote:
I finally put "my" tinyxml in a namespace, so the problem disappeared ;)
Thanks !


Heh, I did the same thing, and didn't even remember. :oops:

-E