Can't compile C++ program with gcc-2.95
Joel Hammer
Joel
Mon May 17 11:46:40 PDT 2004
I am trying to configure pilot-link. All goes well until the configure
program tries a test C++ compilation. It tries c++, g++, and gcc. All fail.
I made a link from g++ to gcc-2.95. It still fails.
Here is the output:
checking for g++... g++
checking whether the C++ compiler (g++ ) works... no
configure: error: installation or configuration problem: C++ compiler cannot
create executables.
The gcc-2.95 works fine with C programs.
The man page for gcc-2.95 states:
The C and C++ compilers are integrated. Both process input files
through one or more of four stages: preprocessing, compilation, assembly,
and linking. Source filename suffixes identify the source language,
but which name you use for the compiler governs default assumptions:
gcc assumes preprocessed (.i) files are C and assumes C style linking.
g++ assumes preprocessed (.i) files are C++ and assumes C++ style linking.
So, what is supposed to happen? If I make gcc and g++ a link to gcc-2.95, is
the compiler smart enuf to know which command, gcc or g++, was used to call
it? If so, why is the configure program failing? Does the configure program
try calling it with gcc anyway?
This isn't the first time this has happened to me. But, I didn't solve
this last time, either.
I don't know a thing about C++ so I can't give it a test file to compile.
Any insight appreciated.
Joel
More information about the Linux-users
mailing list