I created a simple file to understand the gcc compiler
#include "stdio.h"
void main()
{
printf("Hello World!");
}
$ gcc -o hello hello.c
gcc: hello: A file or directory in the path name does not exist.
hello.c: In function `main':
hello.c:3: warning: return type of `main' is not `int'
the hello.o file was created, now I ran this command---
$ gcc -c hello.c
hello.c: In function `main':
hello.c:3: warning: return type of `main' is not `int'
then finally the last command---
$ ld -lc -o hello hello.c
ld: 0711-715 ERROR: File hello.c cannot be processed.
The file must be an object file, an import file, or an archive.
What went wrong? I need some help...
Thanks!
Dano
dan_kryzer@hotmail.com
What's your major malfunction
#include "stdio.h"
void main()
{
printf("Hello World!");
}
$ gcc -o hello hello.c
gcc: hello: A file or directory in the path name does not exist.
hello.c: In function `main':
hello.c:3: warning: return type of `main' is not `int'
the hello.o file was created, now I ran this command---
$ gcc -c hello.c
hello.c: In function `main':
hello.c:3: warning: return type of `main' is not `int'
then finally the last command---
$ ld -lc -o hello hello.c
ld: 0711-715 ERROR: File hello.c cannot be processed.
The file must be an object file, an import file, or an archive.
What went wrong? I need some help...
Thanks!
Dano
dan_kryzer@hotmail.com
What's your major malfunction