Mail Archives: djgpp/1997/09/03/14:05:52
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 -