delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/10/19:28:45

From: earnie_boyd AT hotmail DOT com (Earnie Boyd)
Subject: Re: Gcc compiler b18 newbie probs
10 Dec 1997 19:28:45 -0800 :
Message-ID: <19971210220223.5992.qmail.cygnus.gnu-win32@hotmail.com>
To: khan AT xraylith DOT wisc DOT edu
Cc: gnu-win32 AT cygnus DOT com


>To: Rich Dorfman <webhead AT web-feats DOT com>
>Cc: gnu-win32 AT cygnus DOT com
>Subject: Re: Gcc compiler b18 newbie probs
>Date: Wed, 10 Dec 1997 09:40:38 -0600
>From: Mumit Khan <khan AT xraylith DOT wisc DOT edu>
>
>Rule-of-thumb, especially for new users:
>  
>  - use the right compiler driver to compile/link programs. For C 
programs,
>    use gcc, for C++ use c++ and for F77 use g77.

                          ^^^ shouldn't this be g++

gcc will (or so it is documented to do so) determine if the code is C++.  
Also file extensions are used to determine C vs C++.  The cygwin gcc 
will compile a file named hello.c as C if you type

gcc -c hello.c

It will compile it as C++ if you type

gcc -c hello.C

hello.c and hello.C are the same file as the win32 filesystem is case 
insensitive when in comes to finding the file on disk.  However the 
command line case is kept intact so that gcc will operate differently on 
the file based on the lowercase .c or the UPPERCASE .C.


>
>There are cases where you need a different driver, but then you'd have 
to
>know what libraries need to be linked in explicitly and so on. Not 
worth
>the hassle for usual projects, but sometimes needed for multi-language
>projects, especially when mixing F77 and C/C++.
>
>Regards,
>Mumit -- khan AT xraylith DOT wisc DOT edu
>http://www.xraylith.wisc.edu/~khan/
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
>


-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd AT hotmail DOT com-
------ooo0O--O0ooo-------


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019