3

If there's no Makefile in the same directory as the program that you're trying to compile, make uses its default configuration. In the appliance, make uses some environment variables to run the compilation command that you see on .c files. For more information about these variables, see Variables Used by Implicit Rules!


2

I needed to add -lm to the libraries and remove all headers from the Makefile. # space-separated list of header files HDRS = dictionary.h # space-separated list of libraries, if any, # each of which should be prefixed with -l LIBS = -lm While I was working on my hash function, I found I needed to use <math.h> in order to use exponents, so it was ...


1

You're on the right track, but I suspect your file structure isn't right, or you've misinterpreted something wrong. All of the code files, *.c, *.h, the Makefile and the songs directory should be in the directory pset3/music, not in pset3/music/songs. Only the songs are in the songs subdir. If you're looking at the IDE and there's a pointer that points to ...


1

Hopefully, this article from Cloud9 support, Code Disappeared or Lost, will help you recover your source code.


1

LIBS is a variable in the makefile. if you look at the lines # default target $(EXE): $(OBJS) $(HDRS) Makefile $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) you can probably tell that it gets substituted with its value in the compilation command. this variable should contain any libraries you want to link (using the -l option). when you include a header file (...


1

Try changing this else if (strcmp(&c, "'") == 0) into this else if (c == '\'') EDIT Try running make speller instead of make dictionary


1

Pay attention to these lines in your Makefile: # space-separated list of libraries, if any, # each of which should be prefixed with -l LIBS = You should add math.h so make knows it needs to link it (as in -lm)


1

When run without a makefile, Make takes its cues from environment variables set in your shell (specifically, those loaded in (specifically, those loaded in /etc/profile.d/appliance50.sh). To get the same behavior from Make as it has in the CS50 Appliance, you can add the following to your .bashrc (or .zshrc, etc, if you're using a different shell): export ...


1

Place the file named spl.jar (from pset4 files) in the same directory as your executable!


1

The Makefile makes use of tabs for indentation. Gedit automatically converts tabs to spaces unless specifically told to. Open Gedit, choose from menu Edit->Preferences, click on the Editor tab from the windows that appears, and uncheck "Insert spaces instead of tabs". Then reopen your Makefile, clear the spaces and insert tabs.


Only top voted, non community-wiki answers of a minimum length are eligible