When trying to compile a simple program I am getting this error using Visual Studio Code on my MacBook Pro. Trying to avoid using Pico as my editor because it sucks. Please help!
eph525@Anthonys-MBP MAE 2360 % g++ Test.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-W
deprecated]
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)
eph525@Anthonys-MBP MAE 2360 %
My code is this:
#include<stdio.h>
int main()
{
printf("Hello world");
return 0;
}
eph525@Anthonys-MBP MAE 2360 % g++ Test.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-W
deprecated]
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)
eph525@Anthonys-MBP MAE 2360 %
My code is this:
#include<stdio.h>
int main()
{
printf("Hello world");
return 0;
}