473,513 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4343
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
11219
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
5239
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
5712
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
17981
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
52427
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
3737
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
3047
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
18221
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
3262
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...
0
7264
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7386
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1601
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.