This is the mail archive of the
mailing list for the Cygwin project.
Re: Why won't my files link?
- From: "Elfyn McBratney" <elfyn-cygwin at exposure dot org dot uk>
- To: "cygwin" <cygwin at cygwin dot com>,"Nick Miller" <nmiller at cs dot oberlin dot edu>
- Date: Wed, 5 Feb 2003 22:33:37 -0000
- Subject: Re: Why won't my files link?
- References: <Pine.OSF.firstname.lastname@example.org>
> 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'
O.K. Was this file, io_functions.o , compiled on Linux by any chance? Do you
have the source (io_functions.c) lying around so you can re-compile it and
see if you still get link errors?
My suspisions are that this file was indeed compiled on Linux and hense the
> 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
> 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'
This is due to the undefined referrences above.
> And it continues missing more methods... then...
> collect2: ld returned 1 exit status
This comes out because ld could not link the final executable image.
> 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.
Dont worry about it! :-) Everyone starts somewhere. As long as you learn
from your, well not really but, mistakes then your all the wiser ::::-) I
don't mean this in a bad way what so ever.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html