3
我試圖在PintOS makefile上運行make,但是我不斷收到對'floor'錯誤的未定義引用。下面是makefile。我使用gcc 4.6.1運行Ubuntu 11.10。任何幫助表示讚賞。在PintOS上運行時獲取對「floor」的未定義引用
all: setitimer-helper squish-pty squish-unix
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
〜
Make將打印它正在調用的確切命令。 GCC運行的確切命令是什麼? – 2012-04-01 12:07:14
可能庫在對象文件和鏈接器處於按需模式之前傳遞。嘗試使用'gcc -o something something.o -lm',或者將'-Wl, - 不需要的'添加到編譯器標誌。 – 2012-04-01 12:07:57