我收到以下链接器错误:
来源(hello_world.c
):
#include <stdio.h>
int main(){
printf("hello world\n");
return 0;
}
编译:
$ gcc hello_world.c
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$