undefined reference to `_IO_getc'

Amadeus amadeus at iksw-muees.de
Thu Sep 27 18:55:23 CEST 2007

Hello Lai,

On Donnerstag, 27. September 2007, lylai wrote:
> Hello.
> Can you help me a bit with this error?
> /bin/sh ../../libtool --mode=link ucfront-gcc arm-linux-elf-gcc   -O2
> -g -fomit-frame-pointer -fno-common -fno-builtin -Wall 
> -mswp-byte-writes -DCONFIG_NDS_ROM8BIT -mcpu=arm946e-s -mfpu=fpe3
> -DEMBED -D__PIC__ -fpic -msingle-pic-base -Dlinux -D__linux__ -Dunix
> -D__uClinux__ -Wall -Wno-unused -Wno-comment -Wl,-elf2flt -D__PIC__
> -fpic -msingle-pic-base -mswp-byte-writes -o wml  wml.o -L. -lwml
> mkdir .libs
> ucfront-gcc arm-linux-elf-gcc -O2 -g -fomit-frame-pointer -fno-common
> -fno-builtin -Wall -mswp-byte-writes -DCONFIG_NDS_ROM8BIT
> -mcpu=arm946e-s -mfpu=fpe3 -DEMBED -D__PIC__ -fpic -msingle-pic-base
> -Dlinux -D__linux__ -Dunix -D__uClinux__ -Wall -Wno-unused
> -Wno-comment -Wl,-elf2flt -D__PIC__ -fpic -msingle-pic-base
> -mswp-byte-writes -o wml wml.o 
> -L/home/fly/svn/dslinux/user/openMotif/src/tools/wml -lwml
> wml.elf2flt: In function `yylex':
> /home/fly/svn/dslinux/user/openMotif/src/tools/wml/lex.yy.c:1541:
> undefined reference to `_IO_getc'
> collect2: ld returned 1 exit status
> make[4]: *** [wml] Error 1

Search in which object file or library the function _IO_getc is 
included, and then add this object/library to the linklist.

> Another side question is that, a program I was trying to port would
> execute an exe file it builds in the process to generate some files.

look into tools/ucfront. Use HOSTCC instead of CC to compile and link.

We're back to the times when men were men 
and wrote their own device drivers.

(Linus Torvalds)

More information about the dslinux-devel mailing list