How to build XMLConverter on Mac
Made with Ogre 1.0.4 | OSX 10.4.2 | XCode 2.1
Tested with Ogre 1.0.4 | OSX 10.3.9 | XCode 1.5
First, open XCode and make a new project
Choose a Command line utility : Standard tool
Then choose your project directory and name : xmlconverter for example...
get rid of the main.c
Add the existing files :
- From ogrenew/Tools/XMLConverter/include :
- OgreXMLMeshSerializer.h
- OgreXMLPrerequisites.h
- OgreXMLSkeletonSerializer.h
- tinystr.h
- tinyxml.h
- and from ogrenew/Tools/XMLConverter/src
- main.cpp
- OgreXMLMeshSerializer.cpp
- OgreXMLSkeletonSerializer.cpp
- tinystr.cpp
- tinyxml.cpp
- tinyxmlerror.cpp
- tinyxmlparser.cpp
- From ogrenew/Mac/XCode/Classes :
- SDLMain.h
- SDLMain.m
Add the frameworks :
- Cocoa from /System/Library/
- Ogre, SDL & zzip from ~/Library/
In tinyxml.h, add #define TIXML_USE_STL on the first line to avoid conversion errors with Ogre::String
In main.cpp, wrap the main function with : extern "C" { }
This should be like this then :
{CODE(wrap="1", colors="c++")}extern "C"
{
main (int numargs, char** args)
{
...
}
}{CODE}
Then go to your project options
in header search paths put : $(HOME)/Library/Frameworks/Ogre.framework/Versions/A/Headers
in framework search path put : $(HOME)/Library/Frameworks
Hit build and enjoy !