I get multiple errors when I try to compile speller.c
from pset6. I've tried switching to -std=gnu89
and I get the same thing. What is going on?
jharvard@appliance (~/Dropbox/pset6): make
clang -ggdb3 -O0 -Qunused-arguments -std=c99 -Wall -Werror -c -o speller.o speller.c
clang -ggdb3 -O0 -Qunused-arguments -std=c99 -Wall -Werror -c -o dictionary.o dictionary.c
clang -ggdb3 -O0 -Qunused-arguments -std=c99 -Wall -Werror -o speller speller.o dictionary.o
dictionary.o: In function `check':
/home/jharvard/Dropbox/pset6/dictionary.c:49: multiple definition of `check'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:49: first defined here
dictionary.o: In function `createNode':
/home/jharvard/Dropbox/pset6/dictionary.c:32: multiple definition of `createNode'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:32: first defined here
dictionary.o: In function `load':
/home/jharvard/Dropbox/pset6/dictionary.c:76: multiple definition of `load'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:76: first defined here
dictionary.o: In function `createNode':
/home/jharvard/Dropbox/pset6/dictionary.c:32: multiple definition of `numberOfWords'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:32: first defined here
dictionary.o: In function `createNode':
/home/jharvard/Dropbox/pset6/dictionary.c:32: multiple definition of `root'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:32: first defined here
dictionary.o: In function `size':
/home/jharvard/Dropbox/pset6/dictionary.c:127: multiple definition of `size'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:127: first defined here
dictionary.o: In function `unload':
/home/jharvard/Dropbox/pset6/dictionary.c:137: multiple definition of `unload'
speller.o:/home/jharvard/Dropbox/pset6/./dictionary.c:137: first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)