Re: [Cooker] include header
On Wed, Sep 13, 2000 at 07:48:41AM -0500, Steve Fox wrote: [drfickle@potato remotehost_applet-0.2.0]$ ll `which gcc` lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/gcc - /usr/bin/colorgcc* -- [drfickle@potato remotehost_applet-0.2.0]$ ll /usr/bin/g++ lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/g++ - /usr/bin/colorgcc* See, it's the same thing ;0) Yeah and mailq is just a symlink to /usr/lib/sendmail. gcc can detect the different name it is being called with. Ala the argv array. As I understand it g++ causes gcc to default to having some additional options to put it in "C++ mode." And the very first sentence of the g++ manpage seems to agree: The C and C++ compilers are integrated; g++ is a script to call gcc with options to recognize C++. The man page also doesn't say anything about filename extentions being used to determine the mode. It mentions what extensions they use but it doesn't say that gcc uses that to recognize them. But then again maybe it's implied. *shrug* I'd use g++ since that is the "defacto standard." -- Ben Reser [EMAIL PROTECTED] http://ben.reser.org "Heuristics are bug ridden by definition. If they didn't have bugs, then they'd be algorithms."
Re: [Cooker] include header
Antony Suter wrote: -- - Antony Suter ([EMAIL PROTECTED]) "Examiner" openpgp:71ADFC87 - "And how do you store the nuclear equivalent of the universal solvent?" Easy, the universal solvent is a binary Julian
Re: [Cooker] include header
Yo, like include header rather than include header.h ? It must work with some versions of gcc as other people can compile it. Just curious but you use gcc command to compile c++ app? I would tend to use the g++ command if I were you. It's the same thing. gcc detects that you're doing c++ based on file extension I believe Uhh, kind of. Say ... -- cut -- #include iostream int main () { cout "Hello world" endl; return 0; } --/cut -- When you use g++ it will work but not with gcc since ld will barf (At least for me (tm)) -- Geoff
Re: [Cooker] include header
Geoffrey Lee wrote: It's the same thing. gcc detects that you're doing c++ based on file extension I believe Uhh, kind of. Say ... -- cut -- #include iostream int main () { cout "Hello world" endl; return 0; } --/cut -- When you use g++ it will work but not with gcc since ld will barf (At least for me (tm)) -- Geoff [drfickle@potato remotehost_applet-0.2.0]$ ll `which gcc` lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/gcc - /usr/bin/colorgcc* -- [drfickle@potato remotehost_applet-0.2.0]$ ll /usr/bin/g++ lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/g++ - /usr/bin/colorgcc* See, it's the same thing ;0) Steve Fox http://k-lug.com
Re: [Cooker] include header
Yo, [drfickle@potato remotehost_applet-0.2.0]$ ll `which gcc` lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/gcc - /usr/bin/colorgcc* -- [drfickle@potato remotehost_applet-0.2.0]$ ll /usr/bin/g++ lrwxrwxrwx1 root root 17 Aug 25 17:12 /usr/bin/g++ - /usr/bin/colorgcc* See, it's the same thing ;0) Humm you have colorgcc? Then I don't know how that work ... The point that I am making is that you shuld *always* use the g++ command when you are compiling c++ code. This is the case whether you are issuing from console / xterm or in Makefile. When you detect a compiler for c++ code you should not detect gcc, rather you should detect for g++. and specify CC=gcc and CXX=g++ and should not mix them up .. -- Geoff
Re: [Cooker] include header
Steve Fox [EMAIL PROTECTED] writes: Does anyone know why gcc b0rks when someone includes things in a C++ app like include header rather than include header.h ? It must work with some versions of gcc as other people can compile it. titi said: it's just two different include files. with "string" you will end up with two different files for example: /usr/include/string.h /usr/include/g++-3/string according to the spelling. -- Guillaume Cottenceau -- Distribution Developer for MandrakeSoft http://www.mandrakesoft.com/~gc/
Re: [Cooker] include header
Yo, Does anyone know why gcc b0rks when someone includes things in a C++ app like include header rather than include header.h ? It must work with some versions of gcc as other people can compile it. Just curious but you use gcc command to compile c++ app? I would tend to use the g++ command if I were you. -- Geoff
Re: [Cooker] include header
Geoffrey Lee wrote: Yo, Does anyone know why gcc b0rks when someone includes things in a C++ app like include header rather than include header.h ? It must work with some versions of gcc as other people can compile it. Just curious but you use gcc command to compile c++ app? I would tend to use the g++ command if I were you. It's the same thing. gcc detects that you're doing c++ based on file extension I believe -- Steve Fox http://k-lug.com