delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/05/17:23:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Wed, 5 Feb 2003 17:23:45 -0500 (EST)
From: Nick Miller <nmiller AT cs DOT oberlin DOT edu>
To: cygwin <cygwin AT cygwin DOT com>
Subject: Re: Why won't my files link?
In-Reply-To: <Pine.GSO.4.44.0302051037250.25432-100000@slinky.cs.nyu.edu>
Message-ID: <Pine.OSF.4.33.0302051721540.19748-100000@occs.cs.oberlin.edu>
MIME-Version: 1.0

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'

there are more about missing printf... so either the file is not finding
this fairly simple operation possible... or I am missing a library or
something...

then... these errors follow:

main.o(.text+0x3f):main.c: undefined reference to '_read_array'
main.o(.text+0x52):main.c: undefined reference to '_print_array'

And it continues missing more methods... then...

collect2: ld returned 1 exit status

That is all...  So yeah, what do you think?

In addition, I would like to acknowledge that I realized I should have
included the error messages sooner, but as my e-mail said, I was not in
the position to run Cywgin and test my stuff again.  I merely wrote back
to the list to send more info on my problem and to respond to the kind
persons who had already e-mailed me.  I did this as a casual thing, not
realizing that I was wasting so much precious time!  I am not writing to
waste your time and I am not writing to get help with C or Linux, etc.  I
merely thought that my problem was due to an inconsistency between the
platforms, and was hoping someone could drop some hints.  Thank you for
your time thus far, and I look forward to a response.

Nick Miller




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

- Raw text -


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