[Tutorial] Getting started on Mac OS X

A forum to store posts deemed exceptionally wise and useful
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

First of all, where is MainMenu.cpp?

2. I failed to build both 1.3.1 and 1.2.

1.3.1 gave me an error message that said something about gcc4.0 error 1

1.2 gives 2 errors: "glBindRenderBufferEXT was not declared in this scope"
and the same with glDeleteRenderBuffersEXT

What to do?
hAlp!?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Maybe main.cpp, not mainmenu.cpp?
You have to post the whole error message, not just parts. And the 1.2 problem is a typo, don't know what the name should be. Try to check the same part in 1.3.
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

I'm just gonna give up instead. 8)
hAlp!?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Pretty smart idea :?
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

Nothing is really going my way. I tried irrlicht with 3 versions, and it didn't work. I tried Espresso3D but that didn't work out either (mainly because I'm retarded) and even Blender hates me. I tried a radiosity baking script which of course didn't work. It seems that irrlicht 1.3.1 wants to compile a ppc version with gcc4.0.1 and that is wierd because I have an intel mac. And last time I checked my Gcc was 4.0.0. I tried searching for the correct spelling in the renderbuffer errored file in 1.3.1, and I couldn't find it because the typo is on line 2607 in 1.2, and the same file has only 2200 lines in 1.3.1
hAlp!?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to search for the method, it's now located in OpenGLExtensionHandler.cpp.
The problem with the Mac port is that we don't have Macs (well Nico has one, but it's a ppc, so probably some issues with Intel Macs left, still). You will need some knowledge of compiling apps, no way around this. Even more on the Mac, die to only minor support from our side. But you should be able to fix those minor issues with the XCode project provided by the SDK, it's just some file removing and adding. And there are also forum postings which help on those issues.
mystictheurge
Posts: 1
Joined: Wed Oct 10, 2007 7:32 am

Post by mystictheurge »

Would just like to say, irrlicht 1.3.1 builds/runs beautifully on Mac OSX 10.4.10 Both PPC and intel versions seem to be working, although I currently only have a PPC to actually test myself. (Intel reports come from a friend). The build can be easily accomplished by created a COMPLETELY NEW project file. I found the old one way too corrupt (missing stuff) to actually successfully build. I also changed the build type to a a framework. I'm much more of a fan of dynamic linking libraries, especially for dev work.

Few problems I've had include interesting collision detection, and full screen mode is a bit wierd, I sometimes lose the display during a resolution change. Other than that, I can run all of the examples, along with a few other random irrlicht projects i've found.

Also, if someone can tell me where a good place to upload files is, I'd be happy to upload my project file, modified source, and binaries.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can upload files to the patch tracker (resp. bug tracker) on Irrlicht's project page at SourceForge. Modified sources should be uploaded as patch files against the recent SVN version to simplify addition to Irrlicht core.
dasta
Posts: 1
Joined: Fri Oct 19, 2007 11:56 pm
Location: Edinburgh, UK

Post by dasta »

Thanks to osxus3r and to zathras for the instructions. Finally I got it compiling.

But I got an error when I execute:
testIrrlicht has exited due to signal 6 (SIGABRT).
[Session started at 2007-10-20 00:54:25 +0100.]
ZeroLink: unknown symbol '__ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKc'

testIrrlicht has exited due to signal 6 (SIGABRT).
The code that I'm trying to compile is the one at http://ruthless.zathras.de/facts/apps/p ... on-mac.php

Anybody could help me? Thanks a lot.

Cheers.
ummonk
Posts: 3
Joined: Wed Oct 24, 2007 4:46 am

libIrrlichtMac.a error

Post by ummonk »

I tried to build and got the following errors:

Code: Select all

Building target “mech” of project “mech” — (2 errors)
	    cd /Users/ummonk/mech
    /usr/bin/gcc-4.0 -bundle -arch ppc libIrrlichtMac.a -Wl,-all_load -mmacosx-version-min=10.4 -Wl,-twolevel_namespace -Wl,-twolevel_namespace_hints -Wl,-undefined -Wl,dynamic_lookup -Wl,-multiply_defined -Wl,suppress -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o /Users/ummonk/mech/build/mech.build/Debug/mech.build/Objects-normal/ppc/libIrrlichtMac.ab
/usr/bin/ld: libIrrlichtMac.a(jcapimin.o) has local relocation entries in non-writable section (__TEXT,__symbol_stub1)
collect2: ld returned 1 exit status
		/usr/bin/ld: libIrrlichtMac.a(jcapimin.o) has local relocation entries in non-writable section (__TEXT,__symbol_stub1)
		collect2: ld returned 1 exit status
	    cd /Users/ummonk/mech
    /usr/bin/gcc-4.0 -bundle -arch i386 libIrrlichtMac.a -Wl,-all_load -mmacosx-version-min=10.4 -Wl,-twolevel_namespace -Wl,-twolevel_namespace_hints -Wl,-undefined -Wl,dynamic_lookup -Wl,-multiply_defined -Wl,suppress -isysroot /Developer/SDKs/MacOSX10.4u.sdk -o /Users/ummonk/mech/build/mech.build/Debug/mech.build/Objects-normal/i386/libIrrlichtMac.ab
/usr/bin/ld: libIrrlichtMac.a(jccoefct.o) has local relocation entries in non-writable section (__TEXT,__text)
collect2: ld returned 1 exit status
		/usr/bin/ld: libIrrlichtMac.a(jccoefct.o) has local relocation entries in non-writable section (__TEXT,__text)
		collect2: ld returned 1 exit status
Build failed (2 errors)
Edit: btw I am using the irrlicht1.3 compiled lib found earlier on this thread.
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

HOLY CR*P I MADE IT WORK! Sorry for gravedigging.

Thanks for all the help, and thanks for the new release.
hAlp!?
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

Uh. Nope. Didn't work. I can't load the objects, I tried Zathras' tutorial and Tutorial1, but all I get is the background color. On the Zathras tutorial I got a grey background, and 2000 - 3000 fps. I did everything it said in the tutorial, and I built the libIrrlicht.a file myself (not libMacOSX.a anymore?).

The error message is:

[Session started at 2007-12-22 11:49:25 +0100.]
Irrlicht Engine version 1.4
Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386
Using renderer: OpenGL 2.0
ATI Radeon X1600 OpenGL Engine: ATI Technologies Inc.
OpenGL driver version is 1.2 or better.
GLSL version: 1.2
Could not load mesh, file format seems to be unsupported: /Users/gustavpihl/IreLight/build/Release/IarLite.app/Contents/MacOS/../Resou#D

IarLite has exited due to signal 15 (SIGTERM).
hAlp!?
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

I think I have isolated the problem, I removed the respath code in the object loading command, and it works. Somebody will have to teach me how to make it more portable though, because now, I have to load the files like this:
node->setMaterialTexture( 0, driver->getTexture("/Users/gustavpihl/IreLight/shuttle1.jpg"));

Only one real problem left, how do I texture it? The picture on RuTH's page has textures, and with the same .obj, I get a grey shade.
hAlp!?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

.obj files need a .mtl file for the texture and material information. A material also has to be referenced in the .obj file at the positions where the material is activated (for the next vertices in that file). So you'll need a proper material file or do the textureing manually (as the md2 files in the in examples, using setTexture), however creating proper texture coords is not that easy.
phlogios
Posts: 13
Joined: Fri Aug 03, 2007 9:23 pm
Location: Lund, Sweden

Post by phlogios »

But how do I address the mtl file? I'm using the same code as Zathras.
hAlp!?
Post Reply