PowerPC only with Xcode 2.2

If you’re a developer and found this via google, and your problem is that you get warnings saying something about cputype(7) -arch i386 and a linker error when doing a ppc-only release build in Xcode 2.2, jump right to solution, the explanation is just for some friends of mine.

The Problem

I’ve just done an important step in development of my program and my sister wanted to have demo build for her to play on her iBook with. The problem is that due to ZeroLink and other funny stuff, I could not give her the app I used for my development, it would have exited right at startup. So I had to create a “Release” build in Xcode.

My problem is that I cannot create an universal binary, because I use Newton and that is PowerPC only (at the moment). Not creating an universal binary was more of a challenge than I would have imagined. First of all, I had trouble linking to a static C++ library (Google helped me solve this one) and then I got an awful lot of warnings saying something about cputype(7) -arch i386 and finally a linker error. The Xcode settings were all correct and Google new about the problem, but no solution.

The solution

I discovered this by accident, there is likely to be a different, better way. Anyway, in the project.pbxproj (located in the .xcodeproj bundle) you should go to the line saying ARCHS = (. There, just delete the line saying i386 (which is there no matter what the build settings are). Clean the project (don’t know whether this is required or not) and build, it should work.

Xcode later replaced the whole ARCHS list with simply ARCHS = ppc;. I guess the above procedure might have worked if I replaced the list with this right from the start, but my way works well, too, so I don’t care.

I don’t think many people will actually find this with Google, but I know for sure that I would have been pleased to find this when I just had this problem

Oh, by the way, my game build is working, contact me IRL or with IM and I’ll send it to you. It’s very boring, so I’m not gonna put it on the homepage yet

Written on February 26th, 2006 at 10:01 pm

0 Comments

    New comments can no longer be posted because it got to annoying to fight all the spam.