delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/05/10:54:04

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 5 Feb 2003 10:53:45 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Nick Miller <nmiller AT cs DOT oberlin DOT edu>
cc: cygwin <cygwin AT cygwin DOT com>
Subject: Re: Why won't my files link?
In-Reply-To: <Pine.OSF.4.33.0302051018020.25984-100000@occs.cs.oberlin.edu>
Message-ID: <Pine.GSO.4.44.0302051037250.25432-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Nick,

Well, this certainly is better than what you had before.  Although it
still doesn't provide the exact error messages, it provides enough
information to make a guess as to why your link doesn't work.  It's
possible that you're referring to some symbols in a library that's missing
from your system.  As I said earlier, without the exact error message it's
hard to provide a more concrete guess.
	Igor
P.S. This has nothing to do with header files.  If there were an error in
a header file, your program modules would not even *compile*.  As I
understood you, the compilation proceeds fine, and the errors appear at
the *linking* stage.  Depending on which symbol name is considered
unresolved, it could be a problem with your code, with libraries, or with
gcc options.

On Wed, 5 Feb 2003, Nick Miller wrote:

> 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...
>
> io_functions.o
> io_functions.h
> fun.h
>
> Then, in main.c I am saying,
>
> #include "io_functions.h"
> #include "fun.h"
>
> 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!
>
> Nick

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


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