Hi,all
I'm writing a simple c program on my m1 MacBook with vscode ,but when I complied the project, error occurs:
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I installed Xcode and used vscose
and my program is :
#include <cstdio>
int main()
{
char name[100];printf("please input your name:");
scanf("%s",name);
printf("hello,%s",name);
}