*** I have been working on this for awhile and not able to execute. Keep getting this error message. Can someone help or point me in the right direction ?

admin removed code

tmp/mario-7db164.o: In function main': mario.c:(.text+0x2a): undefined reference toget_int' clang: error: linker command failed with exit code 1 (use -v to see invocation) ~/workspace/pset1/mario/ $

1 Answer 1


Are you compiling with make mario? If you are compiling manually with clang, then be sure to include the -lcs50 argument in order to link the library.

But really, just use make.

  • but still its giving me the same error. I used make it showed me the same error but wh/en i used clang with -lcs50 it was ok but i could not execute the ouput?help me out Jun 2, 2018 at 15:52
  • Your code compiles and runs just fine for me when I use make. Are you using the CS50 IDE? Is it up to date (v135)? Are you sure you have saved your source code before trying to compile it?
    – curiouskiwi
    Jun 3, 2018 at 2:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .