Forum Discussion
Altera_Forum
Honored Contributor
15 years agocan not use curses LIBS by -lcurses
vt100.c:
#include <curses.h> int main() { initscr(); //box(stdscr,ACS_VLINE,ACS_HLINE); move(LINES/2,COLS/2); waddstr(stdscr,"Hello,world!"); refresh(); getch(); endwin(); return 0; } I build an example that use the curses for VT100. I can build it in LINUX : gcc -o vt100 vt100.c -lcurses but when I used the nios2-gcc : nios2-linux-uclibc-gcc -o vt100 vt100.c -lcurses some errors: vt100.c:1:20: curses.h: No such file or directory well How can I link the correct LIBS?5 Replies
- Altera_Forum
Honored Contributor
which IDE/EDS are you using?
--- Quote Start --- some errors: vt100.c:1:20: curses.h: No such file or directory --- Quote End --- I think this is not (yet) an error related to wrong library inclusion. If the library isn't included properly you will get a linker error. This error is not a linker error. Have you added the directory of "curses.h" to the include pathes? Regards - Altera_Forum
Honored Contributor
thanks pillemann (http://www.alteraforum.com/forum/member.php?u=9830)
I use : Centos 5.2 LINUX nios2-linux-20100621.tar tarball in uClinux branch. - Altera_Forum
Honored Contributor
Sorry I don't use linux version. I can't determine your IDE/EDS Version from your last post.
Which NIOS EDS/IDE Version do you use? And have you included the directory which contains "curses.h" to the application include pathes? Is the error still coming up? regards - Altera_Forum
Honored Contributor
arens,
Where is curses.h located? You can't assume that the Nios II GCC has the same default include paths as your native compiler. It looks like you'll have to add an additional "-I" to include the directory where curses.h resides. Cheers, --slacker - Altera_Forum
Honored Contributor
thanks slacker .
I had tried : [root@localhost vt100]# nios2-linux-uclibc-gcc -I/usr/include/ -o hello hello.c -lcurses /opt/nios2/usr/bin/nios2-linux-uclibc-ld.real: cannot find -lcurses collect2: ld returned 1 exit status