0

Ok, here it goes:

I managed to compile the .xcodeproj provided with the last zip achive into a .a library file (a static library then).

I failed to build a working application that uses irrlicht as a 3D engine with Xcode, I don't really know to do it since I'm sort of unable to use an IDE.

I tried to link a simple program with this library, but I have errors...

#include "path_to_irrlicht.h"
#include <OpenGL/OpenGL.h>
using namespace irr; 
using namespace core; 
using namespace scene; 
using namespace video; 
using namespace gui; 

int main()
{
IrrlichtDevice* device = createDevice(EDT_OPENGL, dimension2d<u32>(640,480));
}

EDIT: I had to set the project setting to 10.6 compatibility...

The problem is I don't know what kind of project to choose when creating one... A tutorial says to create a Carbon one, but the xcode's interface changed and I don't know what to pick instead...

What would you do ?

PS: On their forum nobody has a working mac to try it, so I'm a little in a dead end... It would be a nice occasion for me to learn how to build an app with code coming from other platforms with my mac.

jokoon
  • 6,207
  • 11
  • 48
  • 85

1 Answers1

0

The irrlicht SDK comes with the .xcodeproj project file bundle. You already successfully compiled it; it also contains the project for the sample codes. Try compiling the example 01, "Hello world." Don't forget to change EDT_SOFTWARE with EDT_OPENGL; otherwise the sample program will horribly slow-down your system!

Can you compile and run it?

Once you did that, in XCode, create a new project using "Cocoa command line tool". You need to add .a file, etc. Just follow what the sample .xcodeproj does.

I would say that if you just use irrlicht XCode won't help you much. If you're used to Emacs or Eclipse or whatever, just use it.

Yuji
  • 34,103
  • 3
  • 70
  • 88
  • Can you compile the sample code? In the Xcode project, in the tool bar, you can change the target from the `.a` to any of the sample program. – Yuji Oct 06 '10 at 22:38
  • Yes it works now, the problem also were that I had to change the project setting to 10.6 compatible, if not it doesn't want gcc42. And yes I also learned how to specify the target :D – jokoon Oct 07 '10 at 06:43