delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/10/25/21:48:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 25 Oct 2005 21:48:09 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Jeff Scudder <jeffrey DOT scudder AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: undefined references compiling gcc with ncurses
In-Reply-To: <d75352a00510251638n27cc0de1k2313b470588547a9@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0510252145440.5057@slinky.cs.nyu.edu>
References: <d75352a00510251638n27cc0de1k2313b470588547a9 AT mail DOT gmail DOT com>
MIME-Version: 1.0

On Tue, 25 Oct 2005, Jeff Scudder wrote:

> Greetings,
> I am a curses newbie and having trouble running a simple curses
> program. I haven't run into a discussion thus far on the specific
> problem I'm having and I imagine there is a simple solution. My
> program is named ctest.c and is as follows:
> [snip]
> And I compile using
>
> gcc -lncurses ctest.c
      ^^^^^^^^^
> When linking I get an undefined reference for each curses function.
> I'm sure I'm doing something wrong.

Classic newbie mistake.  Libraries should follow source/object files on
the gcc command line.  "gcc ctest.c -lncurses" should work.  Not
Cygwin-specific.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019