Z
zapr
I am trying to compile on Mac OS X 10.4 my C program. I am stuck at the
link phase where I get (gcc 4.01):
$ gcc -s -Os -Wall -fprofile-arcs -fpack-struct -fno-common -ffast-math
-ffloat-store -fno-strict-aliasing -fno-align-functions
-fno-align-labels -fno-align-loops -fno-align-jumps
-fsingle-precision-constant -nostdlib -nodefaultlibs -nostartfiles
main.o -lpthread /Library/Frameworks/SDL.framework/Versions/A/SDL
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL -lgcc -o
intro
/usr/bin/ld: Undefined symbols:
dyld_stub_binding_helper
collect2: ld returned 1 exit status
make: *** [intro] Error 1
According to this:
http://developer.apple.com/documentation/DeveloperTools/Reference/MachOR
eference/Reference/reference.html#//apple_ref/c/func/dyld_stub_binding_h
elper
if I add the -lcrt1.o argument to the command line I get another error:
/usr/bin/ld: multiple definitions of symbol __start
main.o definition of __start in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../crt1.o private
external definition of __start in section (__TEXT,__text)
collect2: ld returned 1 exit status
make: *** [intro] Error 1
any insights on how to solve this error?
--zapro
PS.
The source file (even a dummy hello world code) was compiled with:
CFLAGS = -s -Os -Wall -fprofile-arcs -fpack-struct -fno-common
-ffast-math -ffloat-store -fno-strict-aliasing -fno-align-functions
-fno-align-labels -fno-align-loops -fno-align-jumps
-fsingle-precision-constant
-F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
gcc $(CFLAGS) -c main-test.c -o main-test.o
gcc $(CFLAGS) -fverbose-asm -S main-test.c -o main-test.S
link phase where I get (gcc 4.01):
$ gcc -s -Os -Wall -fprofile-arcs -fpack-struct -fno-common -ffast-math
-ffloat-store -fno-strict-aliasing -fno-align-functions
-fno-align-labels -fno-align-loops -fno-align-jumps
-fsingle-precision-constant -nostdlib -nodefaultlibs -nostartfiles
main.o -lpthread /Library/Frameworks/SDL.framework/Versions/A/SDL
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL -lgcc -o
intro
/usr/bin/ld: Undefined symbols:
dyld_stub_binding_helper
collect2: ld returned 1 exit status
make: *** [intro] Error 1
According to this:
http://developer.apple.com/documentation/DeveloperTools/Reference/MachOR
eference/Reference/reference.html#//apple_ref/c/func/dyld_stub_binding_h
elper
if I add the -lcrt1.o argument to the command line I get another error:
/usr/bin/ld: multiple definitions of symbol __start
main.o definition of __start in section (__TEXT,__text)
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../crt1.o private
external definition of __start in section (__TEXT,__text)
collect2: ld returned 1 exit status
make: *** [intro] Error 1
any insights on how to solve this error?
--zapro
PS.
The source file (even a dummy hello world code) was compiled with:
CFLAGS = -s -Os -Wall -fprofile-arcs -fpack-struct -fno-common
-ffast-math -ffloat-store -fno-strict-aliasing -fno-align-functions
-fno-align-labels -fno-align-loops -fno-align-jumps
-fsingle-precision-constant
-F/Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks
gcc $(CFLAGS) -c main-test.c -o main-test.o
gcc $(CFLAGS) -fverbose-asm -S main-test.c -o main-test.S