좋아, 나는이 중복 될 수 알지만, 어떤 다른 답변을 찾을 수없는 내 문제. Pintos를 설치하려고하는데 src/utils 디렉토리에서 'make'를 실행하면 'floor'에 대한 정의되지 않은 참조가 있다는 오류가 발생합니다. 나는 메이크를 확인하고 여기에 내가 가진 무엇 :
all: setitimer-helper squish-pty squish-unix
# 2207718881418
CC = gcc
CFLAGS = -Wall -W
LDFLAGS = -lm
setitimer-helper: setitimer-helper.o
squish-pty: squish-pty.o
squish-unix: squish-unix.o
clean:
rm -f *.o setitimer-helper squish-pty squish-unix
나는 =이 있지만 도움이되지 않았다 -lm LIBS를 추가했습니다. 메이크업의
출력 :이 딜레마에
gcc -lm setitimer-helper.o -o setitimer-helper
setitimer-helper.o: In function `main':
setitimer-helper.c:(.text+0xbb): undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [setitimer-helper] Error 1
모든 솔루션을?
전체 컴파일러 명령은 보이지 않지만 라이브러리는 끝에 갈 필요가 있습니다. http://stackoverflow.com/questions/9966959/linker-errors-when-compiling-against-glib/9966989#9966989 – hmjd
죄송합니다. 도움이된다고 생각하지 마십시오. 나는 단순히 make를 실행하면 오류가 발생합니다. – varagrawal
make의 출력, 특히'gcc' 라인을 게시 할 수 있습니까? – hmjd