I thought, but why can't i compile it with XCode? How can i do that anyway?
By having an Intel machine with the correct SDK installed. With this code the platform is Intel processors/machines now you having a PPC means it will never compile on that platform the instruction set the compiler is looking for is not going to be there. Now there is a method called cross compiling where you can compile code on another platform that targets a different platform than it has been compiled on but this does not apply to you Intel code is never going to run on PPC.