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]
Other format: [Raw text]

Re: Why won't my files link?


On Wed, Feb 05, 2003 at 05:23:45PM -0500, Nick Miller wrote:
>Okay everyone... thank you for your help and for your feedback.  Allow me
>to attempt to clarify a little bit more...
>
>1) I am new to GCC.  I am new to C.  I had worked until Java until
>recently.
>
>2) I used the SAME io_functions.o file in both Cygwin and Linux.  This
>file was generated by a CS professor at my school using GCC.  When I use
>the
>
>gcc -o main fun.o io_functions.o main.o
>
>command (is it inappropriate to call it a command?), it works fine on
>Linux.  It did not work in Cygwin and I wrote the list to see if maybe
>someone knew of a discrepancy.
>
>The idea of some libraries being absent from the Cygwin package or my
>machine specifically sound likely... the error messages are as follows...
>
>io_functions.o(.text+0x13): In function 'read_array':
>: undefined reference to 'fopen'
>io_functions.o(.text+0x4f): In function 'read_array':
>:undefined reference to 'printf'

You need to '#include <stdio.h>' in io_functions.c.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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