delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/09/20/20:07:28

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-YMail-OSG: ncB6jrsVM1mmF2XeUjNFIbBJrdqtD1AOBpXgRKD8p.Nu_d929VspURxjHCWkbcdblcrqA_ZBBe9xdnQl4UquzN1xFh2LdEp23Z7FFHEYr5MZYSWYsn8e
Message-ID: <46F30B1B.4020007@sbcglobal.net>
Date: Fri, 21 Sep 2007 00:06:51 +0000
From: Greg Chicares <gchicares AT sbcglobal DOT net>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: gcc header file help should be a minor problem
References: <12807222 DOT post AT talk DOT nabble DOT com>
In-Reply-To: <12807222.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

On 2007-09-20 22:25Z, patrickinminneapolis wrote:
> 
> This works fine : 
> gcc -c -fpic example.c example_wrap.c

I thought that'd give a (harmless) warning about '-fpic', but anyway...

> But I want to include files in a different directory, so just to test, I
> moved example_wrap.c to c:\ , i tested
> gcc -c -fpic -I/cygdrive/c/ example.c example_wrap.c  //failed (couldn't
> find example_wrap.c)

'-I' is for finding headers named in an #include directive. But
'example_wrap.c' is a source file, not a header, so do this:

gcc -c example.c /cygdrive/c/example_wrap.c

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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