Anyone have ncurses running on OSX?

Find out how to get that @*&^$&@ thing to compile!

Anyone have ncurses running on OSX?

Postby <trevorsm> » Sun Dec 29, 2002 11:41 pm

Previously posted here

I installed ncurses from the .pkg installer from this site on my Mac G4 running OSX 10.1 earlier this month. The install went off without a hitch (or a complaint worthy of the installer bringing to my attention, at least).

However, whenever I attempted to compile a program using the ncurses library and header, I would get several "unused multiple definitions" of the standard curses functions.

These were only warnings of course, and the program would compile fine otherwise. Whenever I would run the program, the ncurses color functions would refuse to take effect. I WAS able to use the wattron and wattroff functions to display chararcters in blink, bold, underline, and other modes.

Could it be possible that I need to install X-Windows for color to work? Has anyone else tried installing ncurses, and run into problems? I'd like to put this behind me so I can decide whether to continue my little "project" on the Mac, or just fall back to my PC running FreeBSD.
<trevorsm>
 

Re: Anyone have ncurses running on OSX?

Postby <trevorsm> » Fri Jan 03, 2003 3:00 am

The non-color issue was solved simply by installing Eterm in place of my xterm and my other shells. As I far as that goes, I now have 2 of 3 problems solved... [img]images/icons/smile.gif"%20border="0[/img]

I am still getting multiple definition warnings when I link a program with the -lncurses library. I've checked through the list, and it includes each of the standard curses functions and none of the new ncurses functions--possibly the old curses header is getting included along with the ncurses one somehow? [img]images/icons/confused.gif"%20border="0[/img]

The linker warnings are as follows:
<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><hr><pre>
/usr/bin/ld: warning unused multiple definitions of symbol _COLS
/usr/local/lib/libncurses.dylib(lib_setup.o) definition of _COLS
/usr/lib/libSystem.dylib(curses.o) unused definition of _COLS
/usr/bin/ld: warning unused multiple definitions of symbol _LINES
/usr/local/lib/libncurses.dylib(lib_setup.o) definition of _LINES
/usr/lib/libSystem.dylib(curses.o) unused definition of _LINES
/usr/bin/ld: warning unused multiple definitions of symbol _endwin
/usr/local/lib/libncurses.dylib(lib_endwin.o) definition of _endwin
/usr/lib/libSystem.dylib(tty.o) unused definition of _endwin
/usr/bin/ld: warning unused multiple definitions of symbol _initscr
/usr/local/lib/libncurses.dylib(lib_initscr.o) definition of _initscr
/usr/lib/libSystem.dylib(initscr.o) unused definition of _initscr
/usr/bin/ld: warning unused multiple definitions of symbol _mvcur
/usr/local/lib/libncurses.dylib(lib_mvcur.o) definition of _mvcur
/usr/lib/libSystem.dylib(cr_put.o) unused definition of _mvcur
/usr/bin/ld: warning unused multiple definitions of symbol _noecho
/usr/local/lib/libncurses.dylib(lib_echo.o) definition of _noecho
/usr/lib/libSystem.dylib(tty.o) unused definition of _noecho
/usr/bin/ld: warning unused multiple definitions of symbol _raw
/usr/local/lib/libncurses.dylib(lib_raw.o) definition of _raw
/usr/lib/libSystem.dylib(tty.o) unused definition of _raw
/usr/bin/ld: warning unused multiple definitions of symbol _stdscr
/usr/local/lib/libncurses.dylib(lib_data.o) definition of _stdscr
/usr/lib/libSystem.dylib(curses.o) unused definition of _stdscr
/usr/bin/ld: warning unused multiple definitions of symbol _waddch
/usr/local/lib/libncurses.dylib(lib_addch.o) definition of _waddch
/usr/lib/libSystem.dylib(addch.o) unused definition of _waddch
/usr/bin/ld: warning unused multiple definitions of symbol _waddnstr
/usr/local/lib/libncurses.dylib(lib_addstr.o) definition of _waddnstr
/usr/lib/libSystem.dylib(addnstr.o) unused definition of _waddnstr
/usr/bin/ld: warning unused multiple definitions of symbol _wgetch
/usr/local/lib/libncurses.dylib(lib_getch.o) definition of _wgetch
/usr/lib/libSystem.dylib(getch.o) unused definition of _wgetch
/usr/bin/ld: warning unused multiple definitions of symbol _wmove
/usr/local/lib/libncurses.dylib(lib_move.o) definition of _wmove
/usr/lib/libSystem.dylib(move.o) unused definition of _wmove
/usr/bin/ld: warning unused multiple definitions of symbol _wrefresh
/usr/local/lib/libncurses.dylib(lib_refresh.o) definition of _wrefresh
/usr/lib/libSystem.dylib(refresh.o) unused definition of _wrefresh
/usr/bin/ld: warning unused multiple definitions of symbol _ttytype
/usr/local/lib/libncurses.dylib(lib_setup.o) definition of _ttytype
/usr/lib/libSystem.dylib(setterm.o) unused definition of _ttytype
/usr/bin/ld: warning unused multiple definitions of symbol _curscr
/usr/local/lib/libncurses.dylib(lib_data.o) definition of _curscr
/usr/lib/libSystem.dylib(curses.o) unused definition of _curscr
/usr/bin/ld: warning unused multiple definitions of symbol _tputs
/usr/local/lib/libncurses.dylib(lib_tputs.o) definition of _tputs
/usr/lib/libSystem.dylib(tputs.o) unused definition of _tputs
/usr/bin/ld: warning unused multiple definitions of symbol _echo
/usr/local/lib/libncurses.dylib(lib_echo.o) definition of _echo
/usr/lib/libSystem.dylib(tty.o) unused definition of _echo
/usr/bin/ld: warning unused multiple definitions of symbol _cbreak
/usr/local/lib/libncurses.dylib(lib_raw.o) definition of _cbreak
/usr/lib/libSystem.dylib(tty.o) unused definition of _cbreak
/usr/bin/ld: warning unused multiple definitions of symbol _noraw
/usr/local/lib/libncurses.dylib(lib_raw.o) definition of _noraw
/usr/lib/libSystem.dylib(tty.o) unused definition of _noraw
/usr/bin/ld: warning unused multiple definitions of symbol _nocbreak
/usr/local/lib/libncurses.dylib(lib_raw.o) definition of _nocbreak
/usr/lib/libSystem.dylib(tty.o) unused definition of _nocbreak
/usr/bin/ld: warning unused multiple definitions of symbol _wclrtoeol
/usr/local/lib/libncurses.dylib(lib_clreol.o) definition of _wclrtoeol
/usr/lib/libSystem.dylib(clrtoeol.o) unused definition of _wclrtoeol
/usr/bin/ld: warning unused multiple definitions of symbol _PC
/usr/local/lib/libncurses.dylib(lib_tputs.o) definition of _PC
/usr/lib/libSystem.dylib(curses.o) unused definition of _PC
/usr/bin/ld: warning unused multiple definitions of symbol _ospeed
/usr/local/lib/libncurses.dylib(lib_tputs.o) definition of _ospeed
/usr/lib/libSystem.dylib(tputs.o) unused definition of _ospeed
/usr/bin/ld: warning unused multiple definitions of symbol _resetty
/usr/local/lib/libncurses.dylib(lib_ttyflags.o) definition of _resetty
/usr/lib/libSystem.dylib(tty.o) unused definition of _resetty
/usr/bin/ld: warning unused multiple definitions of symbol _savetty
/usr/local/lib/libncurses.dylib(lib_ttyflags.o) definition of _savetty
/usr/lib/libSystem.dylib(tty.o) unused definition of _savetty
/usr/bin/ld: warning unused multiple definitions of symbol _idlok
/usr/local/lib/libncurses.dylib(lib_options.o) definition of _idlok
/usr/lib/libSystem.dylib(idlok.o) unused definition of _idlok
/usr/bin/ld: warning unused multiple definitions of symbol _newwin
/usr/local/lib/libncurses.dylib(lib_newwin.o) definition of _newwin
/usr/lib/libSystem.dylib(newwin.o) unused definition of _newwin
/usr/bin/ld: warning unused multiple definitions of symbol _nl
/usr/local/lib/libncurses.dylib(lib_nl.o) definition of _nl
/usr/lib/libSystem.dylib(tty.o) unused definition of _nl
/usr/bin/ld: warning unused multiple definitions of symbol _subwin
/usr/local/lib/libncurses.dylib(lib_newwin.o) definition of _subwin
/usr/lib/libSystem.dylib(newwin.o) unused definition of _subwin
/usr/bin/ld: warning unused multiple definitions of symbol _nonl
/usr/local/lib/libncurses.dylib(lib_nl.o) definition of _nonl
/usr/lib/libSystem.dylib(tty.o) unused definition of _nonl
</pre>[/quote]
<trevorsm>
 

Re: Anyone have ncurses running on OSX?

Postby <trevorsm> » Fri Jan 03, 2003 4:22 am

I take that back, color isn't working in Eterm either... [img]images/icons/frown.gif"%20border="0[/img]

I wrote up a quick test program that printed the result of can_change_color(), and it appropriately returns FALSE. Me wants color! You help please!

I also removed the old curses.h header from the include directory and put it someplace safe, but I still recieve multiple unused symbols warnings when linking. It doesn't seem like this could be related to the color problem, but it baffles me nonetheless.

I also have one last question... is there any way I can get a font with the PC-style extended ASCII characters? I was hoping I could use the tees, blocks, and so on, but my Mac fonts all have accented letters in place of them.
<trevorsm>
 

Re: Anyone have ncurses running on OSX?

Postby jpm » Fri Jan 03, 2003 6:26 am

if running mac os x 10.2+ or darwin 6.0+, ncurses should already be installed no?
jpm
 
Posts: 18
Joined: Fri Dec 20, 2002 8:00 pm
Location: 42° 16.62' north, 83° 45.23' west

Re: Anyone have ncurses running on OSX?

Postby <trevorsm> » Fri Jan 03, 2003 11:50 pm

Nay, I'm running 10.1 since I was a bit reluctant to spend $130 more to upgrade to 10.2--all I have is the lame curses library Apple included. Would it really be worth it to pay $130 for ncurses and gcc3 (gcc3 which I already have)? [img]images/icons/mad.gif"%20border="0[/img]
<trevorsm>
 

Re: Anyone have ncurses running on OSX?

Postby <DirtRoad> » Sat Mar 22, 2003 11:02 pm

Long lag here, but I presume nobody found the answer for color... which is setenv TERM ansi at least on Jag.
<DirtRoad>
 


Return to Compile Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron