Re: Problem Linking after gcc Compile
From: David Anderson (davea_at_quasar.engr.sgi.com)
Date: 09/11/04
- Next message: cosmos_at_octane.hepcat.org: "Re: initial .php script won't start in fasttrack 3.02"
- Previous message: Jeff Corbets: "Problem Linking after gcc Compile"
- In reply to: Jeff Corbets: "Problem Linking after gcc Compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 11 Sep 2004 20:03:18 GMT
In article <chvk6g$11lq$1@f04n12.cac.psu.edu>,
Jeff Corbets <jcorbets@psu.edu> wrote:
>Hi,
>
>After finally getting my Octane to run the way I would like, I have
>tried to move over some of my development work to the 64-bit machine.
>
>I have compiled many different versions of distributed software on the
>machine, so I thought the development system was set up correctly.
>However, it failed to link my simple "Hello World" program and the
>messages are still a little cryptic to me.
>
>The following is the command and output to gcc:
>sirius 1% gcc -v hello.cpp -o hello.e Reading specs from
That is not the right command, really. On any machine AFAIK.
The correct command for a C++ compile by GNU is
g++
because that knows the extra c++ linking magic.
The same reason you would not use IRIX cc to build a
C++ hello-world app, you would use CC.
Confusingly, the common practice is to say 'gcc' verbally and
in email and gcc does do the front-end parts right (as cc on
IRIX does). But gcc is not the right command for C++, nor is cc ...
Try
g++ hello.cpp -o hello.e
(with or without -v)
Corrections to:
David B. Anderson davea at sgi dot com http://reality.sgiweb.org/davea
- Next message: cosmos_at_octane.hepcat.org: "Re: initial .php script won't start in fasttrack 3.02"
- Previous message: Jeff Corbets: "Problem Linking after gcc Compile"
- In reply to: Jeff Corbets: "Problem Linking after gcc Compile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|