so i just ran basic hello world code in VS code(c language)
then I went to terminal and wrote “gcc . first project c
” (first project is the file name)
then I got this
PS C:UsersuserDocumentsVS CODES> gcc '.first project.c'
.first project.c: In function 'main':
.first project.c:4:5: warning: implicit declaration of function 'print' [-Wimplicit-function-declaration]
print("Hello World");
^~~~~
C:UsersuserAppDataLocalTempccGIZDx0.o:first project.c:(.text+0x16): undefined reference to `print
collect2.exe: error: ld returned 1 exit status
there was question similar to this but the answers were hoshposh i wasnt able to get anything
ik this question might be dumb but i am just beginner so..
Thanks for the help
ran the hello world code
`#include<stdio.h>
int main(){
print("Hello World");
return 0;
}
`
then went to compiler and tried to run with gcc but the aforementioned code came in the terminal…
i’ve searched it on stack overflow and got the question but the answers are all messy
and please explain to me in layman terms
Legitto is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.