Installing ncurse on Panther

yes a lot :

i tried compiling this sample file and i got :

Belaran:ncurse/ncurses_programs/JustForFun] belaran% gcc tt.c
ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_cbreak
_echo
_endwin
_initscr
_intrflush
_keypad
_mvprintw
_mvwprintw
_newwin
_noecho
_printw
_scanw
_stdscr
_wattr_off
_wattr_on
_wborder
_wclear
_wgetch
_wmove
_wrefresh
 
You need to specify the linker flag -lncurses:

gcc -lncurses tt.c

This causes gcc to find the library /usr/lib/libncurses.dylib and link it into your program, giving it access to all of those symbols.
 
Okay that it !

Thanks a lot !!!

I've got the same trouble with mysql api do you know the name of "lnmysql" ? More precily how can i find by myself wich options given a specific api ?
 
The -l option causes the linker to search for libraries in /usr/lib. If you specify -lmysql, it will look for /usr/lib/libmysql.a or /usr/lib/libmysql.dylib. If neither of these is present, you will need to install one of them. If the library is in a different path, /usr/share/pgsql/lib for example, you will have to specify an additional search path with the -L option: -L /usr/share/pgsql/lib. If you use Xcode, both options are automatically added when you add the library using Project>Add Files.

If you really have no clue which library an API is present in, you can run the command 'nm -o /usr/lib/* | grep SomeMissingAPI' to attempt to find it, though this does not search Frameworks, and you will have better luck searching Apple's developer documentation for it.
 
Er... I got new problem about ncurses...

I would like to print the ncurses documentation but all i can find on the net is "How To" or "Introduction to ncurses" etc... Or i really need the "real docs" with all the prototype, and function's description. I know i can get through "man" but i'm working on vt500 wich make access to man uneasy while coding. Do you konw where i can find a complete ncurses doc .pdf ?
 
Back
Top