delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/03/17:50:42

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: <009701c2cbd6$a5c13de0$78d96f83@pomello>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>,
"cygwin" <cygwin AT cygwin DOT com>, "Nick Miller" <nmiller AT cs DOT oberlin DOT edu>
References: <Pine DOT OSF DOT 4 DOT 33 DOT 0302031701550 DOT 518-100000 AT occs DOT cs DOT oberlin DOT edu> <020101c2cbd4$3967bb80$696f86d9 AT webdev>
Subject: Re: Why won't my files link?
Date: Mon, 3 Feb 2003 22:50:28 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

Elfyn McBratney wrote:
>> So I am new to Cygwin, but I am enjoying it so far.
> 
> Kewl! :::::::-)
> 
>> I am having a
>> problem, though, please respond if you can... I have three C files
>> (all ending in .c), and I can compile them with GCC by using the -c
>> switch. Then, I want to link all three of the object files that I
>> have created (ending in .o) and make an executable which uses all
>> three.  My file called main.c has two include lines, which says to
>> include "io_functions.h" and "fun.h".  Then I am using this line to
>> link everything and make the executable...
> 
> Right. To all of the files you are tryin to compile (the *.c files
> and the 
> *.h files) reside in the same directory? If so you should be using a
> command similar to
> 
> $ gcc -I.-c fun.c

Missing space between '-I.' and '-c'. Why would you want to use -I. ?

#include "file" searches there anyway.

> You might try compiling each file (into an executable) before,
> in-case there are errors, so you'll have peace of mind that they'll
> actually compile. 

Do you mean (into an object) ?


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