delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/12/13:01:09

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
Reply-To: Cygwin List <cygwin AT cygwin DOT com>
Message-Id: <6.1.0.6.0.20040612125233.03287230@pop.prospeed.net>
X-Sender:
Date: Sat, 12 Jun 2004 12:54:52 -0400
To: geneSmith <gene DOT smith AT sea DOT siemens DOT com>, cygwin AT cygwin DOT com
From: Larry Hall <cygwin-lh AT cygwin DOT com>
Subject: Re: __getreent undefined on linux app build
In-Reply-To: <cadamj$s4j$1@sea.gmane.org>
References: <cacvd3$vfu$1 AT sea DOT gmane DOT org> <cad5ca$i3b$1 AT sea DOT gmane DOT org> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040611171421 DOT 03297b68 AT pop DOT prospeed DOT net> <cadamj$s4j$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0

At 06:11 PM 6/11/2004, you wrote:
>Larry Hall wrote, On 6/11/2004 5:22 PM:
>>Yes, libcygwin.a is the import library.  But I don't understand why you need it (or -lc either for that matter).  Just compiling with Cygwin's
>>gcc/g++ gets you all this, unless you're using -mno-cygwin, in which case you're undoing it by explicitly linking Cygwin anyway.  Clearly,
>>you're doing something I don't understand but in the whole sheme of things, my understanding of your problem isn't a requirement for
>>anything. ;-)
>
>When I made a hello world which calls printf I don't have to do -lc on gcc cmd line. But when I make a lib which calls c lib functions, I have to provide -lc (and -lcygwin). Not doing -mno-cygwin.



You mean like this?

# cat t.c
#include <string.h>

int main(int argc, char *argv[])
{
        char *p = strstr("p", argv[1]);
        return 0;
}
# gcc -o t t.c
#

Something is weird in your environment, though I'm not sure what it is.
Perhaps you want to look at the output of 'gcc -v'.  Or maybe your just
as happy working around the problem.  But something is wrong here.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


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