Closed doichev-kostia closed 2 years ago
This error don't show when I use such command clang -o mario mario.c -lcs50
. However, it shows while using make mario
. Can someone explain to me what is the difference, please?
I kinda faced same error, while using make it showed up, but with clang it does not.
I believe it has something to do with the header file and the installation of it. I use Linux Ubuntu, I will check it again and notify you if I find a solution for it.
Maybe it's something connected with this prefix -lcs50
On CS50 IDE, CS50 configures make
with these defaults, using environment variables!
https://github.com/cs50/cli/blob/main/etc/profile.d/cli.sh#L57-L59
Thanks a lot
I am some kind of beginner in programming and absolute beginner in C and I don't know how to troubleshoot such error:
Undefined symbols for architecture x86_64: "_get_int", referenced from: _main in mario-89f3ee.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1
Used CLion IDE from JetBrains as CS50 IDE was loading extremely long.
I installed cs50 library as It was written on README. However, when I was trying to connect it using #include and used get_int function, I got an error that I mentioned above.
picture of error