public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compiler problem - curses.h
@ 2002-10-17 14:02 Reed Sekiya
  2002-10-17 14:08 ` bjorn rohde jensen
  0 siblings, 1 reply; 2+ messages in thread
From: Reed Sekiya @ 2002-10-17 14:02 UTC (permalink / raw)
  To: gcc-help

	I've been having problems compiling a program that includes
curses.h to maintain inventory.  "gcc inventory.c" results in undefined
symbols.  I've tried compiling it on several different versions of
unix.  I've tried everything that I could think of.  Can someone please
help me get over this problem?  The various error reports on the different
version of unix are:

kaala% gcc inventory.c
inventory.c: In function `main':
inventory.c:108: warning: return type of `main' is not `int'
ld: Undefined symbol 
   _wprintw 
   _touchwin 
   _delwin 
   _COLS 
   _wstandend 
   _box 
   _newwin 
   _printw 
   __tty_ch 
   _wdelch 
   _LINES 
   _wrefresh 
   _wstandout 
   __echoit 
   _stdscr 
   _waddch 
   _waddstr 
   _initscr 
   _endwin 
   _wmove 
   __rawmode 
   _wgetch 
   _wclear 
   __tty 
collect2: ld returned 2 exit status
kaala% exit

spectra% gcc inventory.c
In file included from /usr/include/curses.h:23,
                 from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/include/curses.h:5,
                 from inventory.c:12:
/usr/include/widec.h:42: warning: `getwc' redefined
/usr/include/wchar.h:326: warning: this is the location of the previous
definition
/usr/include/widec.h:43: warning: `putwc' redefined
/usr/include/wchar.h:329: warning: this is the location of the previous
definition
/usr/include/widec.h:44: warning: `getwchar' redefined
/usr/include/wchar.h:327: warning: this is the location of the previous
definition
/usr/include/widec.h:45: warning: `putwchar' redefined
/usr/include/wchar.h:330: warning: this is the location of the previous
definition
Undefined                       first referenced
 symbol                             in file
noecho                              /var/tmp/ccObh7Pv.o
endwin                              /var/tmp/ccObh7Pv.o
initscr32                           /var/tmp/ccObh7Pv.o
box32                               /var/tmp/ccObh7Pv.o
wstandout                           /var/tmp/ccObh7Pv.o
COLS                                /var/tmp/ccObh7Pv.o
cbreak                              /var/tmp/ccObh7Pv.o
erasechar                           /var/tmp/ccObh7Pv.o
wclear                              /var/tmp/ccObh7Pv.o
getcurx                             /var/tmp/ccObh7Pv.o
getcury                             /var/tmp/ccObh7Pv.o
wprintw                             /var/tmp/ccObh7Pv.o
printw                              /var/tmp/ccObh7Pv.o
LINES                               /var/tmp/ccObh7Pv.o
wgetch                              /var/tmp/ccObh7Pv.o
newwin                              /var/tmp/ccObh7Pv.o
wrefresh                            /var/tmp/ccObh7Pv.o
wdelch                              /var/tmp/ccObh7Pv.o
delwin                              /var/tmp/ccObh7Pv.o
wstandend                           /var/tmp/ccObh7Pv.o
w32addch                            /var/tmp/ccObh7Pv.o
stdscr                              /var/tmp/ccObh7Pv.o
wmove                               /var/tmp/ccObh7Pv.o
waddstr                             /var/tmp/ccObh7Pv.o
echo                                /var/tmp/ccObh7Pv.o
touchwin                            /var/tmp/ccObh7Pv.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
spectra%

uhunix2:/home/17/rsekiya/public_html% gcc inventory.c
In file included from /usr/include/curses.h:23,
                 from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/include/curses.h:5,
                 from inventory.c:12:
/usr/include/widec.h:38: warning: `getwc' redefined
/usr/include/iso/wchar_iso.h:337: warning: this is the location of the
previous definition
/usr/include/widec.h:39: warning: `putwc' redefined
/usr/include/iso/wchar_iso.h:340: warning: this is the location of the
previous definition
/usr/include/widec.h:40: warning: `getwchar' redefined
/usr/include/iso/wchar_iso.h:338: warning: this is the location of the
previous definition
/usr/include/widec.h:41: warning: `putwchar' redefined
/usr/include/iso/wchar_iso.h:341: warning: this is the location of the
previous definition
Undefined                       first referenced
 symbol                             in file
noecho                              /var/tmp/cccdv4Ly.o
endwin                              /var/tmp/cccdv4Ly.o
initscr32                           /var/tmp/cccdv4Ly.o
box32                               /var/tmp/cccdv4Ly.o
wstandout                           /var/tmp/cccdv4Ly.o
COLS                                /var/tmp/cccdv4Ly.o
cbreak                              /var/tmp/cccdv4Ly.o
erasechar                           /var/tmp/cccdv4Ly.o
wclear                              /var/tmp/cccdv4Ly.o
getcurx                             /var/tmp/cccdv4Ly.o
getcury                             /var/tmp/cccdv4Ly.o
wprintw                             /var/tmp/cccdv4Ly.o
printw                              /var/tmp/cccdv4Ly.o
LINES                               /var/tmp/cccdv4Ly.o
wgetch                              /var/tmp/cccdv4Ly.o
newwin                              /var/tmp/cccdv4Ly.o
wrefresh                            /var/tmp/cccdv4Ly.o
wdelch                              /var/tmp/cccdv4Ly.o
delwin                              /var/tmp/cccdv4Ly.o
wstandend                           /var/tmp/cccdv4Ly.o
w32addch                            /var/tmp/cccdv4Ly.o
stdscr                              /var/tmp/cccdv4Ly.o
wmove                               /var/tmp/cccdv4Ly.o
waddstr                             /var/tmp/cccdv4Ly.o
echo                                /var/tmp/cccdv4Ly.o
touchwin                            /var/tmp/cccdv4Ly.o
ld: fatal: Symbol referencing errors. No output written to a.out
collect2: ld returned 1 exit status
uhunix2:/home/17/rsekiya/public_html%


Reed Sekiya

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: compiler problem - curses.h
  2002-10-17 14:02 compiler problem - curses.h Reed Sekiya
@ 2002-10-17 14:08 ` bjorn rohde jensen
  0 siblings, 0 replies; 2+ messages in thread
From: bjorn rohde jensen @ 2002-10-17 14:08 UTC (permalink / raw)
  To: Reed Sekiya; +Cc: gcc-help

Hi Reed,

  Are you really only including the library
header and not linking with the library
itself? You are lacking a -lcurses option
to gcc in the two listed cases for sure.

Yours sincerely,

Bjorn

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-17 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-17 14:02 compiler problem - curses.h Reed Sekiya
2002-10-17 14:08 ` bjorn rohde jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).