佚名通过本文主要向大家介绍了openwrt,openwrt固件下载,openwrt教程,openwrt路由器,openwrt中文网等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: openwrt : undefined reference to `pthread_create'
描述:
Openwrt 环境
Makefile内容如下
APP_BINARY=uvc_stream
LFLAGS +=-lpthread
OBJECTS=uvc_stream.o color.o utils.o v4l2uvc.o
all: uga_buga
clean:
@echo "Cleaning up directory."
rm -f *.a *.o $(APP_BINARY) core *~ log errlog *.avi
# Applications:
uga_buga: $(OBJECTS)
$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(APP_BINARY)
romfs:
$(ROMFSINST) /bin/$(APP_BINARY)
解决方案1:
描述:
openwrtmakefile
这个要怎么改啊? -lpthread 已经有添加了,就是报错:undefined reference to `pthread_create'Openwrt 环境
Makefile内容如下
APP_BINARY=uvc_stream
LFLAGS +=-lpthread
OBJECTS=uvc_stream.o color.o utils.o v4l2uvc.o
all: uga_buga
clean:
@echo "Cleaning up directory."
rm -f *.a *.o $(APP_BINARY) core *~ log errlog *.avi
# Applications:
uga_buga: $(OBJECTS)
$(CC) $(CFLAGS) $(LFLAGS) $(OBJECTS) -o $(APP_BINARY)
romfs:
$(ROMFSINST) /bin/$(APP_BINARY)
解决方案1:
找找看编译环境 有没有 libpthread , 不然把 libpthread 放到当前目录 -L.试下
头文件有没有?
解决方案3:你确定你的Openwrt 环境里有pthread吗?