cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/03/14:05:52

From: SerDevian <scriven AT CS DOT ColoState DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gcc/gxx c++ -> .o (#defines)
Date: Fri, 29 Aug 1997 10:04:53 -0600
Organization: XYZZ Software Co.
Lines: 24
Message-ID: <3406F325.41C6@CS.ColoState.edu>
References: <340488B6 DOT 59E2 AT CS DOT ColoState DOT edu> <34049F7C DOT 5B11 AT cornell DOT edu>
NNTP-Posting-Host: dali.vis.colostate.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

A. Sinan Unur wrote:
> > Is there a way to get gxx to *not* link in extra libraries, or get gcc
> > to explicitly compile c++ code?

> gxx is not a compiler of any sort, it is just a wrapper to do precisely
> what you described it does. so long as you give your c++ source the
> correct extension (i prefer .cc, others .cpp), gcc will compile your
> code fine as c++.
> 
> i.e. gcc -c code.cc will work fine.

That's how I expected it to act, but when compiling files with a ".cc"
extension, gcc didn't "#define __cplusplus".  However, I just found the
"-x c++" option; I'll try it next.  I guess if nothing else works, I can
always set "GXX = gcc -D__cplusplus" in my makefile...  I'm just
confused as to why this isn't automatic; I'm probably doing something
wrong.


 _  _ _  _ ___ ___  -----------"Use the source, Luke!"---------
( \/ ( \/ (__ (__ ) | ~  Scott Scriven (SerDevian / XYZZ)     |
 \  / \  /  //  //  | mailto:scriven AT CS DOT ColoState DOT edu         |
 /  \ / /  //_ //_  | mailto:scriven AT VIS DOT ColoState DOT edu        |
(_/\_(_/  (___(___) | http://www.vis.colostate.edu/~scriven/  |

- Raw text -


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