Get_int function not recognized


#1

I can’t get this file:
#include <cs50.h>

int main(void)
{
get_int()
}
to make. I get:
clang -fsanitize=integer -fsanitize=undefined -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wshadow integer.c -lcrypt -lcs50 -lm -o integer
integer.c:5:5: error: implicit declaration of function ‘int_get’ is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int_get( );
^
1 error generated.
Please help. It seems the library doesn’t contain the function.
Thanks DVE


#2

One thing that catches my eye is that you are calling the function get_int() but the error message mentions int_get(). Are you running make on the file you expect? A common pitfall is to forget to save the file before running make, or running make in a different directory than the file you’re editing.

By the way, since it looks like you’re using a CS50 workspace, if you happen to be doing this as part of CS50’s curriculum you can also look at the resources they offer for additional support!


#3

Thanks!!. I copied the resources and signed up. You are right about the
type - I have ADD at 77 no less, and I frequently haven’t saved or am
running in the wrong directory.
DVE