I bet something is really screwed up there.
First of all, the first error shouldn't happen at all (specifying the return type of a function without declaring that type? or the MacOSX version returns something different?). Second, seems like the object files are built for ppc but the linker wants to link an i386 executable. Or you use a compiler not compatible with the system linker. Or the other way around.
I'd check whether the compiler, linker and the system libraries are compatible with each other.