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