on appliance 19, you can fix that by opening up a terminal window and executing
$ cd
$ wget http://cdn.cs50.net/2013/fall/lectures/5/m/src5m.zip
$ unzip src5m.zip
$ sudo mkdir /usr/include/spl
$ sudo cp -r src5m/spl/include/* /usr/include/spl
$ sudo cp src5m/spl/lib/libcs.a /usr/lib
(if asked for a password, it's crimson
)
then you need to provide the -lm
and -lcs
options as you compile your programs that use the SPL. You can do that in many ways, probably the easiest of which is to copy the following text into a file, and replace <program>
and <source code file>
with the name of your output and the name of your source code file respectively, then save the file with the name Makefile
into same directory as your program
<program>: <source code file> Makefile
clang -ggdb3 -O0 -std=c99 -Wall -Werror -Wno-unused-variable -o <program> <source code file> -lcs -lm
clean:
rm -f *.o core <program>
Hint: replace the 4 spaces before clang
and rm
with tabs