delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/17/15:45:16

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
To: cygwin AT cygwin DOT com
Subject: Re: how to compile programs using (n)curses
References: <Pine DOT GSO DOT 4 DOT 20 DOT 0104171513280 DOT 23359-100000 AT frontal DOT ibb DOT gatech DOT edu>
From: Felix Natter <f DOT natter AT ndh DOT net>
Date: 17 Apr 2001 22:42:25 +0200
Message-ID: <87r8yr9s26.fsf@mybaby.home.felix>
Lines: 34
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.0.100
MIME-Version: 1.0

Charles Wilson <cwilson AT ece DOT gatech DOT edu> writes:

> On 16 Apr 2001, Felix Natter wrote:
> > > > when I try to compile a simple (n)curses program using cygwin,
> > > > I get lots of "undefined reference"-messages, one for each ncurses function,
> > > > but with a "impl_" prepended (i.e. impl_waddch).
> > 
> > I read this, thanks.
> > But I compiled as you suggest. In fact, the problem also occurs if I
> > compile and link in one step:
> > I saved the following as test_curses.c:
> > #include <curses.h>
> > 
> > int main(int argc, char** argv)
> > {
> > 	initscr();
> > 	wclear(stdscr);
> > 	waddstr(stdscr, "hello world");
> > 	wrefresh(stdscr);
> > 	getch();
> > 	endwin();
> > }
> > 
> > gcc -static -DNCURSES_STATIC -o test_curses.exe test_curses
> > => undefined reference to endwin ...
> > gcc -o test_curses.exe test_curses.c
> > => undefined reference to _imp__endwin ...

sorry, of course I added -lcurses in both cases.
It is notable that the results are exactly the same with or without -lcurses
(or -lncurses)..

--
Felix Natter

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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