• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: curses.h - undefined symbols
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >curses.h - undefined symbols (From: Nick Briggs <email@hidden>)

  • Prev by Date: curses.h - undefined symbols
  • Next by Date: Fixed: curses.h - undefined symbols
  • Previous by thread: curses.h - undefined symbols
  • Next by thread: Fixed: curses.h - undefined symbols
  • Index(es):
    • Date
    • Thread