Linking Problem..
Surya Prakash
suryaprakash@multitech.co.in
Wed Oct 3 04:19:00 GMT 2001
Hi,
I have installed gcc cross compiler for m68k target. I have used
Binutils 2.10.1, gcc 2.95.2 , Newlib 1.9.0, Insight 5.0
Installation went on fine. But I am having problems in linking a
simple '.c' file like
#include<stdio.h>
int main(void)
{
printf("\n Hello World");
}
while linking it gives the following errors..
1. undefined reference to '__main'
2 . undefined reference to 'printf'
I am getting these errors only for all library functions and the main. I
am compiling and linking with the following options
m68k-coff-gcc -mcpu32 -c -Wall hello.c
m68k-coff-ld hello.o -o hello.out
Why the library routines are not getting linked ? Am I need to do it
explicitly in the linker command ?
Or was there a problem in installation ?
Hoping any sort of help.....
Thanks and Regards
Surya
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list