Re: curses.h - undefined symbols
Re: curses.h - undefined symbols
- Subject: Re: curses.h - undefined symbols
- From: Chris Espinosa <email@hidden>
- Date: Mon, 20 Aug 2007 11:52:38 -0700
On Aug 20, 2007, at 11:45 AM, Nick Briggs wrote: We're porting some linux code which includes <curses.h>
So I've tried adding libcurses.dylib to the project but still get undefined symbols when building
How do we link against libcurses?
Many thanks
Nick
/usr/bin/ld: Undefined symbols: _COLS _LINES _endwin _init_pair _initscr _keypad _mvprintw _noecho _printw _raw _resetty _resizeterm _savetty _start_color _stdscr _waddch _waddnstr _wattr_on _werase _wgetch _wmove _wrefresh
1) please cite the linker invocation line, not just the error output; that will be much more instructive of what's wrong. 2) The classic cause of this is #including the libcurses header from C++ code without enclosing it in an extern "C" { } directive. Your C++ code then expects libcurses to export C++ interfaces rather than C, and the linker cannot match them up.
Chris |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden