Operating System - Linux
1753819 Members
9442 Online
108805 Solutions
New Discussion

Re: Compiler issues, while compiling using gcc

 
Steve Ellcey
Valued Contributor

Re: Compiler issues, while compiling using gcc

As Stephen said, the small test case doesn't show anything other than that you can't compile C++ code with a C compiler. Actually GCC used the cpp suffix on the file to kknow that it should call the C++ compiler but it then did a C-style link, because you ran gcc instead of g++, and thus did not include any C++ runtime libraries on the link line and that is why you got undefs.

No, what I am looking for is a small example program that gives the __type_trait error messages you got in the original attachment.

I did have one thought, you didn't update this system from 11.00 to 11.11 after installing GCC did you? If so it might make sense to reinstall GCC with an 11.11 specific version of GCC.
Chayan
New Member

Re: Compiler issues, while compiling using gcc

Eureka!!!!The Problem got resloved.
Thanks Everyone for various solutions. My sample appliction and comments from various members helped me a lot.
What i conclude is there is bug in the compiler bcoz in my sample appl whenever i try to include my original file and compile it DOES Compile, but as my original file has already the 2 headers i.e., iostream and vector defined, so i thought to remove them from my sample appl, this reproduced the error and hinted me to a souln to include the standard header both in the sample appl and the original file.....and doing the same thing solved my problem.........

Doing this way make sence or not!!!!!!