oneandzeroteam / cs50

2017년 1학기 CS50 스터디
0 stars 0 forks source link

좀 늦은 질문일 수도 있는데 , get_int, get_string 등 함수 사용 #4

Open inwoo123 opened 7 years ago

inwoo123 commented 7 years ago

lecture를 보면 cs50.h를 include하면 get_int 등의 함수를 쓸 수 있다고 했는데 제가 컴파일을 할 땐 get_int등의 함수를 참조(reference)할 수 없다고 하네요. 다른 분들은 cs50.h 를 include하면 잘 되시나요?

math.h함수를 참조했을 때도 같은 에러가 발생하네요! 혹시 클라우드 9에서는 stdio.h 라던가 제한적으로만 라이브러리를 참조할 수 있는건가요 ?

/tmp/credit-056f4c.o: In function main': credit.c:(.text+0x73): undefined reference topow' clang: error: linker command failed with exit code 1 (use -v to see invocation)

nicholaskim94 commented 7 years ago

clang을 단독으로 쓰시는 경우에는 커맨드라인에서 cs50 헤더파일을 참조해야합니다. 이를 피해갈려면 강의에서 처럼 make를 사용하시길 바랍니다.