Does arm-elf-gcc support ncurses?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Does arm-elf-gcc support ncurses?



Hi there, 

I am trying to cross-compile a program that uses ncurses-5.4 with
arm-elf-gcc (version 2.95.3 20010315). The different flags and paths
that i am using are as it follows:

UCLINUX		:= /home/juan/Desktop/Downloads/uClinux-dist
INCLUDES 	:= -I${INC_DIR} -I${UCLINUX}/lib/uClibc/include -I
${UCLINUX}/lib/libm -I${UCLINUX}/lib/libcrypt_old -I${UCLINUX}
INCLUDES 	+= -I/targets/LxNETES/buildroot/build_arm/ncurses-5.4/include

STDFLAGS	:= -g -Wall -Wstrict-prototypes -Wno-trigraphs -O2
-fno-strict-aliasing -fno-common -pipe
STDFLAGS	+= -W -ansi -D_SVID_SOURCE -D_XOPEN_SOURCE
STDFLAGS	+= -fno-builtin -DNO_MM -mapcs-32 -mtune=arm7tdmi -msoft-float
-nostdinc -iwithprefix include
CFLAGS		:= ${STDFLAGS} ${DEFINES} ${INCLUDES}


LFLAGS		:= -s  -static ${UCLINUX}/lib/uClibc/lib/crt0.o
${UCLINUX}/lib/uClibc/lib/crti.o ${UCLINUX}/lib/uClibc/lib/crtn.o
LFLAGS		+= -L${UCLINUX}/lib/uClibc/ -L${UCLINUX}/lib/uClibc/lib
-L/targets/LxNETES/buildroot/build_arm/ncurses-5.4/lib
LFLAGS		+= -nostartfiles -W -Wall -Ws -fno-builtin -Wl,-elf2flt -lform
-lmenu -lncurses

By linking i get erros about undefined reference to all the
ncurses-functions that are used in my program: 

arm-elf-gcc -s
-static /home/juan/Desktop/Downloads/uClinux-dist/lib/uClibc/lib/crt0.o /home/juan/Desktop/Downloads/uClinux-dist/lib/uClibc/lib/crti.o /home/juan/Desktop/Downloads/uClinux-dist/lib/uClibc/lib/crtn.o -L/home/juan/Desktop/Downloads/uClinux-dist/lib/uClibc/ -L/home/juan/Desktop/Downloads/uClinux-dist/lib/uClibc/lib -L/targets/LxNETES/buildroot/build_arm/ncurses-5.4/lib -nostartfiles -W -Wall -Ws -fno-builtin -Wl,-elf2flt -lform -lmenu -lncurses /home/juan/ucterminal/build/main19.o /home/juan/ucterminal/build/shm_init.o /home/juan/ucterminal/build/shm_read.o /home/juan/ucterminal/build/shm_write.o /home/juan/ucterminal/build/shm_remove.o -o /home/juan/ucterminal/bin/main19 
/home/juan/ucterminal/bin/main19.elf2flt: In function `main':
/home/juan/ucterminal/bin/main19.elf2flt(.text+0xc4): undefined
reference to `initscr'
/home/juan/ucterminal/bin/main19.elf2flt(.text+0xc8): undefined
reference to `cbreak'
/home/juan/ucterminal/bin/main19.elf2flt(.text+0xcc): undefined
reference to `noecho'
/home/juan/ucterminal/bin/main19.elf2flt(.text+0xdc): undefined
reference to `keypad'

...and so on. 

So it seems to not find the libform.a, libmenu.a and lncurses.a. I have
also checked where the compiler looks for the libraries and even
specified the whole path of these libraries. Firstly i tried to
cross-compile ncurses against uClinux but it did not work, then i did
the same with Buildroot (in that case the compiler was arm-linux-gcc)
but no difference, same results. That's why i am really wondering
whether arm-elf-gcc supports ncurses, or perhaps the problem is that the
compiler is very old (unfortunately that is a project requirement!!). 
Any ideas about how could i get rid of this or any hints?

Best regards, 
Juanfran.