X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=0.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_LN X-Spam-Check-By: sourceware.org Message-ID: <4BF15EC1.5050909@gmail.com> Date: Mon, 17 May 2010 16:20:33 +0100 From: Dave Korn Reply-To: Cygwin Mailing List User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Cygwin Mailing List CC: Luis Vital Subject: Re: NCurses References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 17/05/2010 15:50, Luis Vital wrote: > Hi Dave, > > I appologise for comming back to you but I am experiencing some problems > with NCurses under Cygwin. Hi Luis, Please keep the discussion on the list, for all the reasons described at http://cygwin.com/acronyms/#PPIOSPE. > As they say on the documentation I wrote this program: > > #include > int main() > { > initscr(); /* Start curses mode */ > printw("Hello World !!!"); /* Print Hello World */ > refresh(); /* Print it on to the real screen */ > getch(); /* Wait for user input */ > endwin(); /* End curses mode */ > > return 0; > } > > I compile it with: gcc Hello.c -lncurses > > But I got the folowing error messages: > > /tmp/ccnsdh1e.o:Hello.c:(.text+0x3c): undefined reference to `_stdscr' > /tmp/ccnsdh1e.o:Hello.c:(.text+0x49): undefined reference to `_stdscr' That's peculiar, it shouldn't have worked at all. The "ncurses.h" file doesn't live in /usr/include directly, but in a subdir called /usr/include/ncurses, so with your #include statement as you have it there, I get: > $ gcc h.c -lncurses > h.c:1:21: error: ncurses.h: No such file or directory when I try to compile your example. If I change the example to #include "ncurses/ncurses.h", I get a fully working compile. It seems possible you have a bogus ncurses.h in your /usr/include, for some reason? You should make sure you have installed the regular cygwin libncurses-devel package (using setup.exe) to get the ncurses headers and link libraries (maybe you should try reinstalling it even if you do already have it). cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple