delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/04/11:53:06

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
Message-ID: <D84A32D1A483D211A38F0060B06993D005D0F3DD@wilmexm1.analog.com>
From: "Martini, Emin" <emin DOT martini AT analog DOT com>
To: cygwin AT cygwin DOT com
Subject: FIX: problems not finding crt0.o with gcc
Date: Mon, 4 Jun 2001 11:52:59 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

Today I installed cygwin and started fiddling with gcc.  When I tried to
compile a simple hello world program, I got an error about not being able to
find crt0.o.  Compiling with the -v flag indicated that gcc is trying to
dynamically link with the file crt0.o which is in c:/cygwin/lib.  Also I had
problems with the compiler not seeing where stdio.h and stdlib.h were
located.  I noticed other people had these problems as well by reading the
mailing list archives, but I didn't see a fix.  After some fiddling here is
the fix which worked for me.  Hopefully it will be helpful to others as
well.  I would suggest putting something about this in the FAQ since not
being able to use gcc is pretty serious.

It seems that gcc expects libraries, include files, etc. to be in /.  This
is a problem since the default setup program for cygwin makes / point to the
wrong place.  By issuing the command "mount c:/cygwin /" in bash I got gcc
to see the correct files (e.g. crt0.o, stdio.h, etc.).    

Note that you might need to fix your path in your .bashrc file to include
/bin, /usr/bin, etc. after issuing the mount command.

-Emin

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