0

I just installed 32-bit Ubuntu 14.04 and gcc/g++ 4.8 on my machine.

I wrote a simply hello.c and compiled with command, g++ hello.c -o hello

And it gave me the error that, as: unrecognized option '--32'.

And I am surprised I did not find any result on Google in regard to this error. Need some help! Thank you.

Raymond Chen
  • 44,448
  • 11
  • 96
  • 135
CodingFanSteve
  • 713
  • 2
  • 6
  • 17
  • Is your code C or C++? a .c file extension implies C, but g++ is used for C++ compilation? – mathematician1975 Sep 22 '15 at 23:41
  • I tried gcc for .c and g++ for cpp, but none works. But then I reinstalled the OS, then it worked, seems, me old install got messed up. – CodingFanSteve Sep 24 '15 at 00:15
  • From the edit: "Solution: I reinstalled the OS then it worked. Seems the conf got messed up." Do not put "SOLVED" in the title or put the solution in the question. The solution goes as an answer. – Raymond Chen Sep 24 '15 at 00:32

0 Answers0