Problem in using get_string from cs.50 video

I have just started watching the Harvard cs.50 video and in one lecture they are using the command

string answer = get_string(“name :”);

But when i try to do the same i get an error

test.c:(.text+0x19): undefined reference to `get_string’

Here’s my code

#include <stdio.h>
#include <cs.50>
int main (void) {
string ans = get_string( "name ");
printf("hello,%s \n ", ans);

I don’t see any anything different from the code in the video except that i have used ‘ans’ as a variable instead of ‘answer’
Btw I’m using codespaces to write and execute the code

My recollection is that cs50 requires you to use get_string only because they created that function in their environment. (The course environment) if you are trying at home, then you won’t be able to use this.
Suggest you get specific help from their moderators via their support channels on Reddit.