473,218 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

dyld_stub_binding_helper undefined symbol / crt1.o link error

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/documenta...ference/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
Nov 23 '06 #1
2 4324
On Thu, 23 Nov 2006 15:47:19 -0800, in comp.lang.c ,
za**************@yahoo.it (zapr) wrote:
>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):

/usr/bin/ld: Undefined symbols:
dyld_stub_binding_helper
any insights on how to solve this error?
You're missing some library or startup file for your build env. This
isn't a C question, since its specific to your environment. I suggest
you ask in an OSX or Linux development group since the gcc part will
be common over both
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 24 '06 #2
On Thu, 23 Nov 2006 15:47:19 -0800, za**************@yahoo.it (zapr)
wrote in comp.lang.c:
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/documenta...ference/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
Sorry, you're asking in the wrong place. We discuss the standard C
language here, not specific tool sets or platform specific linking
issues.

You need to ask either in a gcc help group, or more likely on a group
that supports programming for your OS.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stu | last post by:
I am trying to build the xerces shared library with 2.3.0 version of their source code on an AIX 5.1 32 bit machine with the following version of the g++ compiler /usr/local/bin/g++ -v Reading...
2
by: el prinCipante | last post by:
I am a total novice. And granted this probably is a very simple question, it still stops me from finishing my thesis. Thanks in advance for any postings. I am using a library routine and...
4
by: r.nikhilk | last post by:
Hi, We are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by including the...
8
by: pavan734 | last post by:
Hello, Please excuse me as Iam not posting this to correct group. I have a parser code obtained from flex command. I have many other files. When I compile them Iam getting a message like:...
8
by: owolablo | last post by:
I'm making a project involving some C++ source files. It keeps popping up the following error: /usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crt1.o(.text+0x18): In function `_start': :...
1
by: kumarangopi | last post by:
Iam working with graphics.I wrote a pgogram in turbo c for graphics.I need to run on Freebsd system, so installed SDL and trying.when i give make in sdl_image folder /usr/lib/crt1.o undefined...
10
by: Durduran | last post by:
I can't seem to figure out the origin of this error and how I could go about fixing it -- the program that compiled on an older version of the OS no longer compiles with the upgraded version. ...
2
by: Navaneet | last post by:
Hi, I am building a application on linux. I am getting an error which relates to undefined reference to a function. I had build same on other platform, no error comes. Here is whole error...
3
by: singhPrabhat | last post by:
I have some .c and .h files in my directory. My aim is to compile the whole file. I am compiling each and every .c file by gcc -c file_name then I use gcc -o some_text file_name. I have found out...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.