I'm trying to run the file bounce.c as Mr. Malan introduces in a clip. However, I have this error:

jharvard@appliance (~): make bounce
clang -ggdb3 -O0 -std=c99 -Wall -Werror    bounce.c  -lcs50 -lm -o bounce
bounce.c:3:10: fatal error: 'spl/gevents.h' file not found
#include <spl/gevents.h>
1 error generated.

I've updated my CS50 appliance to 19-2, restarted it, but none of them works.

If you could help me, I'd really appreciate.

  • Thank you, guys. I really really appreciate your quick answers. I've solved this problem by downloading the new Appliance for 2015 (with the name Appliance 2014), here: manual.cs50.net/appliance/2014/ I'll leave the question here, in case someone else is confused between the versions like I was. Mar 26 '15 at 15:31

Appliance version 19 is last year's version. This year's version is 2014-29. You cannot upgrade from last year's appliance to this year's appliance so you will need to download the newest version and use that one.

  • Thank you. I've just downloaded and installed the new VMware and appliance. That fixes the gevents.h error. I was confused because the version for this year (2015) is named Appliance 2014. That's why I thought it's the same version as Appliance version 19. However, I'm having trouble with gwindow.h file not found. That's another question. Mar 26 '15 at 15:09
  • The course at Harvard is offered in the fall term only. Thus, the edX material in Spring 2015 is the Fall 2014 material. Appliance v19 is from Fall 2013. Mar 26 '15 at 17:52

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

    rm -f *.o core <program>

Hint: replace the 4 spaces before clang and rm with tabs

  • I never tested the answer above. Please let me know how it goes!
    – kzidane
    Mar 26 '15 at 12:03
  • Thank you. I really appreciate that. Mar 26 '15 at 15:07

You must log in to answer this question.

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