I've been trying to do one of the sample programs in lecture 1 and keep being prompted with the same error. However, when running a simple "Hello, world" program it executes fine. I've installed everything from the YouTube tutorial on setting up a local environment. This is my code:
#include <stdio.h> #include <cs50.h>
int main(void) { string answer = get_string("What is your name? ");
printf("Hello, %s\n", answer); }
This is the error: gabrieltierra@gabriels-mbp-2 cs50 % make hello cc hello.c -o hello Undefined symbols for architecture arm64: "_get_string", referenced from: _main in hello-86b783.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [hello] Error 1
Please help!!!