Seguí these instructions sobre cómo obtener el 10.4 SDK trabajando con PPC después de actualizar a XCode 4. Puedo compilar, pero se produce un error en el tiempo del enlace.No se pudo vincular ppc después de actualizar a XCode 4
Como una arruga agregada, no estoy usando XCode per se, pero la cadena de herramientas gcc que viene con él. (Esto es parte de un gran proyecto multiplataforma que utiliza archivos make.)
Aquí es un makefile de ejemplo:
CXX=g++-4.0
CXXFLAGS=-arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
helloworld: helloworld.o
$(CXX) $^ -o [email protected] $(CXXFLAGS)
con un helloworld.cpp:
#include <stdio.h>
int main(void) {
printf("hello world \n");
return 0;
}
y aquí está su salida:
$ make
g++-4.0 -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -c -o helloworld.o helloworld.cpp
g++-4.0 helloworld.o -o helloworld -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/crt1.o, in section __TEXT,__text reloc 1: sectionForNum(4) section number not for any section for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/NK/NK2TdejFFfOupEszIr4fG++++TM/-Tmp-//ccryAbut.out (No such file or directory)
make: *** [helloworld] Error 1
Por cierto, este archivo MAKE exacto funciona bien en un sistema XCode 3.
De acuerdo, respondí su pregunta nuevamente, espero que cualquiera de las dos soluciones pueda resolver su problema. – Mecki