0

i followed the code about mario thing i used make mario / gcc -g mario.c -o mario -lcs50 -lm

when i use make

mario1.c:9:7: warning: implicit declaration of function 'get_int' is invalid in C99 [-Wimplicit-function-declaration] n = get_int("width: "); ^ 1 warning generated. Undefined symbols for architecture x86_64: "_get_int", referenced from: _main in mario1-10d57c.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [mario1] Error 1

when i use gcc -g mario.c -o mario -lcs50 -lm

Undefined symbols for architecture x86_64: "_get_int", referenced from: _main in mario-a1a215.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

1
  • I think you didn't #include <cs50.h> – Omar Zayed May 24 '20 at 9:12

You must log in to answer this question.

Browse other questions tagged .