public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Link error
@ 2010-08-09 14:26 Phung Nguyen
  2010-08-12 18:08 ` Ian Bolton
  0 siblings, 1 reply; 2+ messages in thread
From: Phung Nguyen @ 2010-08-09 14:26 UTC (permalink / raw)
  To: gcc

Dear all,

I am trying to build cross compiler for xc16x. I built successfully
binutils 2.18; gcc 4.0 and newlib 1.18. Everything is fine when
compiling a simple C file without any library call. It is also fine
when making a simple call to printf like printf("Hello world").
However, i got error message from linker when call printf("i=%i",i);
The error message is as follows

/home/guest/xc16x/lib/gcc/xc16x-elf/lib/xc16xl/libc.a(lib_a-sbrkr.o):
In function _sbrk_r:
/home/guest/newlib-1.18.0/newlib/libc/reent/sbrkr.c:60: undefined
reference to __sbrk
/home/guest/fromKpit/newlib-1.18.0/newlib/libc/reent/sbrkr.c:60:
undefined reference to __sbrk
....

collect2: ld returned 1 exit status
make: *** [bubble.out] Error 1


Is there any idea how to solve the problem? I highly appreciate any help.

Best regards,
Phung

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Link error
  2010-08-09 14:26 Link error Phung Nguyen
@ 2010-08-12 18:08 ` Ian Bolton
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Bolton @ 2010-08-12 18:08 UTC (permalink / raw)
  To: 'Phung Nguyen', gcc

Phung Nguyen wrote:
> I am trying to build cross compiler for xc16x. I built successfully
> binutils 2.18; gcc 4.0 and newlib 1.18. Everything is fine when
> compiling a simple C file without any library call. It is also fine
> when making a simple call to printf like printf("Hello world").
> However, i got error message from linker when call printf("i=%i",i);

I don't know the answer, but I think you are more likely to get one
if you post to gcc-help@gcc.gnu.org.  The gcc@gcc.gnu.org list is for
people developing gcc, rather than only building or using it.

I hope you find your answer soon.

Best regards,
Ian



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-12  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-09 14:26 Link error Phung Nguyen
2010-08-12 18:08 ` Ian Bolton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).