1
jharvard@appliance (~/Dropbox/pset3): make ./bounce
clang -ggdb3 -O0 -std=c99 -Wall -Werror    bounce.c  -lcs50 -l`enter preformatted text here`m -o bounce
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 0 has    invalid symbol index 11
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 1 has invalid symbol index 12
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 2 has invalid symbol index 2
/usr/bin/ld: /usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation 3 has invalid symbol index 2

Q1: if changing "make bounce" (Error) -> "clang ..."(Correct) ,it works. What's the different between?

Error: "make bounce" -> clang -ggdb3 -O0 -std=c99 -Wall -Werror bounce.c -lcs50 -lm -o bounce

Correct: clang -ggdb3 -O0 -std=c99 -Wall -Werror bounce.c -lcs -lm -o bounce

Q2: I download David's code and "make bounce" directly( not using "clang..."), it also works. then i replace Dvaid's code to mine, the error occured again.

  • Code please? Has this been solved? – i_am_david Aug 13 '15 at 16:08

You must log in to answer this question.

Browse other questions tagged .