我尝试编译并行线程的例子,但我得到了以下错误:的Makefile并行线程
make: *** No rule to make target `example.cpp', needed by `example.o'. Stop.
这是我的makefile:
CC = g++
CCFLAGS = -Wall
example: example.o
$(CC) $(CCFLAGS) -o example example.o -pthread
example.o: example.cpp
$(CC) $(CCFLAGS) -c example.cpp -pthread
clean:
- rm *.o
- rm example
我包括-pthread标志,我不知道为了编译还需要什么。有人有主意吗?非常感谢你。
'$(CC)'之前,你有标签或空格吗? – 2013-04-08 09:32:49
我在那里有选项卡。 – KateMak 2013-04-08 09:35:34
如果你在这里复制粘贴你的makefile内容,那么你没有标签。 – 2013-04-08 09:37:01