First off, some info:
Our development environment is Apple Xcode on Mac OS X 10.5, with GCC
4.0
SVN revision 106 of ticpp
I am working on a game project, and was looking for something "easy"
to use so we can read and write xml files. I stumbled upon TinyXML,
and TinyXML++.
I really like the way ticpp works, so I tried to build it.
The first problem that I ran into was that premake has been updated to
version 4.1, but ticpp doesn't work with it out of the box. I then
tried premake 3.7, And luckily, I was able to build it by following
the linux/GNU build instructions.
I then proceeded to add the headers + library file to my empty C++
Xcode project, this automatically links the project with the
libticpp.a which I compiled from source as described above.
To verify that everything was in working order, I then moved on to
paste some tutorial code from the site, which is located at
http://code.google.com/p/ticpp/wiki/BeginersExample
The example code didn't compile, throwing a bunch of errors at me.
I then noticed this comment:
As of version 0.04a if you don't "#define TIXML_USE_TICPP" this will
not compile...
So I added the define in my main.cpp below the includes
The code still refused to compile, until I moved the define ABOVE the
#include of ticpp.h, and was able to use ticpp from then on!
One thing that was a bit confusing though, was that it's not mentioned
which files to include in most of the example code, apart from the
beginners example.
I actually got stuck getting the code to compile, which was my
motivation to write this message, but was able to figure it out (after
a few hours of trying) while writing it . I hope that it's useful to
someone ; )