gcc not working correctly
I'm conpiling a hello world c program:
#include <stdio.h>
int main(void)
{
fprintf(
return 0;
}
When I run gcc hello.c -o hello I get the following output:
moonstroller@
hello.c: In function ‘main’:
hello.c:4: error: stray ‘\342’ in program
hello.c:4: error: stray ‘\200’ in program
hello.c:4: error: stray ‘\234’ in program
hello.c:4: error: ‘Hello’ undeclared (first use in this function)
hello.c:4: error: (Each undeclared identifier is reported only once
hello.c:4: error: for each function it appears in.)
hello.c:4: error: ‘Linux’ undeclared (first use in this function)
hello.c:4: error: expected ‘)’ before ‘programming’
hello.c:4: error: stray ‘\’ in program
hello.c:4: error: stray ‘\342’ in program
hello.c:4: error: stray ‘\200’ in program
hello.c:4: error: stray ‘\235’ in program
I did a sudo apt-get install build-essential and rebooted laptop but it is still not working.
I'm lost at this point.
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Moonstroller
- Solved:
- Last query:
- Last reply: