I'm running the CS50 tools on my Linux Mint 17.1 KDE partition on my Toshiba Satellite E55t-A5320 laptop. I set everything up using this link:
How to Install the Tools for the Course on Ubuntu
However, when I try to compile the code with
make50
which I have set up an alias in
~/.bash_aliases
as
alias make50='make CC=clang CFLAGS="-ggdb3 -O0 -std=c99 -Wall -Werror" LDLIBS="-lcs50 -lm"'
I get this strange error:
pythonhax@PYTHONHAX-MINTKDE:~/Dropbox/CS50x/pset2$ make50 vigenere
clang -ggdb3 -O0 -std=c99 -Wall -Werror vigenere.c -lcs50 -lm -o vigenere
/usr/bin/ld: cannot find -lcs50
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [vigenere] Error 1
pythonhax@PYTHONHAX-MINTKDE:~/Dropbox/CS50x/pset2$
Output of
ld -lcs50 --verbose | grep attempt
is:
pythonhax@PYTHONHAX-MINTKDE:~$ ld -lcs50 --verbose | grep attempt
ld: cannot find -lcs50
attempt to open /usr/x86_64-linux-gnu/lib64/libcs50.so failed
attempt to open /usr/x86_64-linux-gnu/lib64/libcs50.a failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libcs50.so failed
attempt to open //usr/local/lib/x86_64-linux-gnu/libcs50.a failed
attempt to open //usr/local/lib64/libcs50.so failed
attempt to open //usr/local/lib64/libcs50.a failed
attempt to open //lib/x86_64-linux-gnu/libcs50.so failed
attempt to open //lib/x86_64-linux-gnu/libcs50.a failed
attempt to open //lib64/libcs50.so failed
attempt to open //lib64/libcs50.a failed
attempt to open //usr/lib/x86_64-linux-gnu/libcs50.so failed
attempt to open //usr/lib/x86_64-linux-gnu/libcs50.a failed
attempt to open //usr/lib64/libcs50.so failed
attempt to open //usr/lib64/libcs50.a failed
attempt to open //usr/local/lib/libcs50.so failed
attempt to open //usr/local/lib/libcs50.a failed
attempt to open //lib/libcs50.so failed
attempt to open //lib/libcs50.a failed
attempt to open //usr/lib/libcs50.so failed
attempt to open //usr/lib/libcs50.a failed
ld -lcs50 --verbose | grep attempt
to your post?ld
output, suggests that you probably skipped a step when you performed those steps manually. Do you see a successful open attempt on//usr/local/lib/libcs50.a
when you run theld
command now?