c언어 replit 질문입니다
글쓴이: 8926pgg / 작성시간: 토, 2022/03/12 - 12:43오후
replit에 코드를 넣고 실행을 했더니 오른쪽에
make -s
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: ./Q3.o: in function `main':
/home/runner/s/Q3.c:5: multiple definition of `main'; ./main.o:/home/runner/s/main.c:6: first defined here
/nix/store/v8imx1nvyz0hgvx9cbcmh6gp4ngw3ffj-binutils-2.35.1/bin/ld: ./Q3.o: in function `main':
/home/runner/s/Q3.c:9: undefined reference to `prinf'
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:8: main] Error 1
exit status 2
^C
이렇게 뜨면서 실행이 되질 않습니다 왜 이런가요? ㅠㅠ
원래 devc++를 써왔어서 devc++에서 컴파일하고 실행해봤더니 잘됩니다.
Forums:
/home/runner/s/Q3.c:9:
/home/runner/s/Q3.c:9: undefined reference to `prinf'
잘 됐다구요..?
prinf
/home/runner/s/Q3.c:5: multiple definition of `main'; ./main.o:/home/runner/s/main.c:6: first defined here
main을 두 번 정의한 것 같군요.
prinf 정의되지 않은 참조...
printf 에서 t 빠진 거 같네요.
세벌 https://sebuls.blogspot.kr/
댓글 달기