A simple code compiled in linux:
I used "gcc test.cpp -o test" and got the weird errors:Code:#include <stdio.h> #include <stdlib.h> int main () { int i; char szInput [256]; printf ("Enter a number: "); fgets ( szInput, 256, stdin ); i = atoi (szInput); printf ("The value entered is %d. The double is %d.\n",i,i*2); return 0; }
/usr/bin/ld: unrecognized option '--hash-style=both'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
Anything wrong?