Error for M1 mac
aadhil-aslam opened this issue ยท 3 comments
aadhil-aslam commented
Undefined symbols for architecture arm64:
"_get_int", referenced from:
_main in scores-c9119a.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rongxin-liu commented
What command did you run to compile your C program?
rongxin-liu commented
Besure to link CS50 C library when compiling your program:
clang example.c -lcs50 -o example
Thenlie commented
clang example.c -lcs50 -o example
I ran into this same error and this was my issue. Thank you! ๐