I'm an absolute beginner at writing programs in C, and I'm having difficulty compiling a simple program. Here's my code:
/* This code is a .c file that prints out the words hello, world. */
# include <stdio.h>
int main()
{
printf("Hello World! \n");
}
Here's the error I get when compiling:
Ubuntu:~/Desktop/cFiles$ gcc -Wall hello.c -o hello.out -lmls
hello.c:5:1: warning: return type defaults to ‘int’ [-Wreturn-type]
hello.c: In function ‘main’:
hello.c:7:3: warning: implicit declaration of function ‘print’ [-Wimplicit-function-declaration]
hello.c:8:1: warning: control reaches end of non-void function [-Wreturn-type] /usr/bin/ld: cannot find -lmls
collect2: ld returned 1 exit status
I'm not sure what I'm doing wrong. Can anyone help?