delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/04/13:27:26

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
Message-ID: <005c01c2cc7b$05fc9c00$78d96f83@pomello>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Nick Miller" <nmiller AT cs DOT oberlin DOT edu>
Cc: "cygwin" <cygwin AT cygwin DOT com>
References: <Pine DOT OSF DOT 4 DOT 33 DOT 0302041205350 DOT 26834-100000 AT occs DOT cs DOT oberlin DOT edu>
Subject: Re: Why won't my files link?
Date: Tue, 4 Feb 2003 18:27:07 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Nick Miller wrote:
> Hey!!!  Thank you both for your quick responses!  To clear things up,
> let me say this... all of my files are in the same directory.  This
> directory is...
>
> c:/cygwin/home/Owner/
>
> So, then when I want to run an executable that is in that directory, I
> have to use the "./" prefix to run an executable that has been
> created. Elfyn already addressed that though, so I should be able to
> change my path variable and make it so that I do not have to append
> the "./" prefix for the executables.  Executable meaning using the
> ".exe" suffix.  All of the header files and C files are in the same
> directory, as I said.  I will try the stuff that Elfyn suggested and
> get back to you.  I cannot fully compile all of the files on their
> own... I mean... I can do "gcc -c filename.c", and that works fine
> for all files that I am talking about. However, I am assuming that
> full compilation into ".o" files will not work because some of the
> files are not meant to stand alone.  I hope this is not confusing!

Sorry, you are confused.
gcc -c foo.c -o foo.o
gcc -c bar.c -o bar.o
gcc foo.o bar.o -o myprog.exe

.c files go to .o files one at a time.
A group of .o files goes to an .exe

The phrase "full compilation into .o files" does not make sense.

Post the *exact* commands you are using and the *exact* error messages you
get.


Max.


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