[英]Makefile for pthreads
我正在尝试编译一个pthread示例,但是出现以下错误:
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标志,我不确定它还需要什么才能进行编译。 有人有想法么? 非常感谢你。
如此说来,当前目录中没有example.cpp。
在当前目录中执行ls并在此处发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.