This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

FIX: problems not finding crt0.o with gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]