delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/04/15/09:32:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE,TW_LN
X-Spam-Check-By: sourceware.org
Message-ID: <4DA848D5.6050204@bonhard.uklinux.net>
Date: Fri, 15 Apr 2011 14:32:05 +0100
From: Fergus <fergus AT bonhard DOT uklinux DOT net>
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
MIME-Version: 1.0
To: Cygwin ML <cygwin AT cygwin DOT com>
CC: Fergus <fergus AT bonhard DOT uklinux DOT net>
Subject: Still using gcc 3.4.4 - problem with -lncurses
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Using cygwin 1.7 and gcc 3.4.4 I have a line in a script

gcc -o myexec -o3 ./my.a -lreadline -lncurses -lm

which has worked since the Dawn of Time. Just now I had to rebuild 
myexec and got an error message

/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: 
cannot find -lncurses
collect2: ld returned 1 exit status

Strange because I have

setup.exe -P {variouspackages},ncurses,{morepackages}

as my one-line setup command (also with a long history of nofail 
working). But on inspection I see files and folders

/usr/include/ncursesw NOT /usr/include/ncurses
/usr/lib/ncursesw* NOT /usr/include/ncurses*

all dated Feb 15. Did I miss some massive re-configuration and re-naming 
then?

Rewriting the gcc line with -lncursesw not -lncurses works.

However ... I'd quite like to keep this line for the simple reason that 
it works in Linux as well as (up to now) Cygwin. I could write a branch 
but I'd prefer to write a link something like

ln -s ncursesw ncurses

under /usr/include/ or something similar but presumably more complicated 
under /usr/lib/.

Have I identified the cause of the breakage (some kind of supersession 
on or about Feb 15)? Have others tripped up? Is there a good cure?

Thank you.

Fergus

--
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

- Raw text -


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