我试图在PintOS的makefile上运行make命令,但是一直出现“未定义对‘floor’的引用”错误。下面是makefile文件。我正在运行gcc 4.6.1版本的Ubuntu 11.10系统。欢迎提供任何帮助。
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
~
gcc -o something something.o -lm
,或将-Wl,--no-as-needed
添加到编译器标志中。 - Daniel Fischer