This is the mail archive of the
mailing list for the Cygwin project.
Re: Why won't my files link?
- From: Nick Miller <nmiller at cs dot oberlin dot edu>
- To: cygwin <cygwin at cygwin dot com>
- Date: Wed, 5 Feb 2003 10:26:02 -0500 (EST)
- Subject: Re: Why won't my files link?
Okay... I believe that I understand the stages of compiling better than
was shown in the e-mail I had previously sent. Also, I included the full
list of commands I have been using in the initial e-mail that I sent to
the Cygwin list. Here they are below...
gcc -c fun.c
gcc -c main.c
The above commands should make the ".o" object files...
Then, I already have...
Then, in main.c I am saying,
Then, I am using this command below to do the linking...
gcc -o main fun.o io_functions.o main.o
So, the idea here is that I have these three files that are somewhat
dependent on each other and I want to make the final executable called
"main". When I do this process on a Linux machine using the same exact
files, it works fine. When I do this in Cygwin, I am getting errors along
the lines of "reference to undefined *thing*"... I would include the
exact error messages right now, but I am not at my home computer and do
not have a copy of Cygwin on this public machine to test with. Basically
it looks as if my INCLUDE statements are not doing what they are supposed
to, and that particular functions are not being found correctly. As I
wrote before, I believe that for some reason there is some problem with
file access or something...
All of my files are in... C:/cygwin/home/Owner, so I would assume that
the linking of the files should not be a problem. However, it seems that
something is not working. I hope that this has clarified my problem(s).
Please let me know if you have additional suggestions. Thank you so much!
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html