开发者

Trying to compile a working irrlicht application on a mac with plain g++ or Xcode

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜