I cannot compile C/C++ files anymore since using a new account (I think it was since then anyway) and I'm getting a strange error every time I try to compile:
~$ g++ hello.cpp
/usr/lib/x86_64-linux-gnu/libc_nonshared.a: file not recognized: File format not recognized
collect2: ld returned 1 exit status
It happens with both gcc
and g++
and I cannot find any help on this anywhere. I am using Ubuntu 12.04
hello.cpp
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
cout << "Hello" << endl;
return 0;
}