On 5/10/06, tonyr <tonyr@xxxxxxxxxxx> wrote:
I'm looking at the Linux distro Ubuntu 6.06 (Dapper), a Debian derivative, which uses gcc/g++ 4.03. I see that gcc does not recognize the .cc extension as a C++ file, that is gcc foo.cc fails with errors. The man page for gcc says it should recognize .cc files as being c++ and handle them accordingly. foo.cc is the simple C++ program //######################## #include <iostream> using namespace std; int main() { cout << "Hello World! \n"; } //############################### The gcc man page also says that the -x <lang> option should force a language front end, i.e, 'gcc -x c++' should force the c++ front end. That's not working either. Is this behavior a policy change with the gcc version 4 collection, or should I be looking to the Debian or Ubuntu development teams for answers? This looks to me like a build policy decision (building gcc w/o c++ recognition support).
works fine here..the same program with gcc/g++ version 4.0.2 20050901 (prerelease) (SUSE Linux) on a x86/Pentium 4 these three command lines are fine g++ too.cc -o too gcc -x c++ -lstdc++ too.cc -o too gcc -lstdc++ too.cc -o too HTH regards Digz