Altera_Forum
Honored Contributor
19 years agoWho can tell me why? about a makefile question
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/dry.gif hi all:
I use ncurses on nios2 uclinux and it's work fine. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif But I have a question about "LDFLAGS" Who can solve me? make will fail If I write makefile follow $(PROJ_NAME): $(MENUOBJS) $(CC) -elf2flt="$(FLTFLAGS)" -o $@ $(MENUOBJS) -lncurses -lmenu the erro informathion is: nios2-linux-uclibc-gcc -O2 -I./include -I../include -I./lib -c -o src/test4.o src/test4.c nios2-linux-uclibc-gcc -elf2flt="-s 8192" -o menu ./src/test4.o ./lib/libncurses.a ./lib/libmenu.a menu.elf2flt(.text+0x19460): In function `menu_driver': : undefined reference to `getmouse' menu.elf2flt(.text+0x19484): In function `menu_driver': : undefined reference to `wenclose' menu.elf2flt(.text+0x194b8): In function `menu_driver': : undefined reference to `wmouse_trafo' menu.elf2flt(.text+0x19804): In function `menu_driver': : undefined reference to `wenclose' menu.elf2flt(.text+0x19830): In function `menu_driver': : undefined reference to `wmouse_trafo' menu.elf2flt(.text+0x19f48): In function `_nc_Show_Menu': : undefined reference to `copywin' menu.elf2flt(.text+0x1ac6c): In function `_nc_Draw_Menu': : undefined reference to `wbkgdset' menu.elf2flt(.text+0x1ac7c): In function `_nc_Draw_Menu': : undefined reference to `werase' menu.elf2flt(.text+0x1ac88): In function `_nc_Draw_Menu': : undefined reference to `wbkgdset' menu.elf2flt(.text+0x1b044): In function `unpost_menu': : undefined reference to `werase' menu.elf2flt(.text+0x1b054): In function `unpost_menu': : undefined reference to `delwin' menu.elf2flt(.text+0x1b060): In function `unpost_menu': : undefined reference to `delwin' collect2: ld returned 1 exit status But if I write makefile $(PROJ_NAME): $(MENUOBJS) $(CC) -elf2flt="$(FLTFLAGS)" -o $@ $(MENUOBJS) -lmenu -lncurse make success Who can tell me why? i only reversed the positions of -lmenu and -lncurse. Thanks a lot