C OpenWrt SDK定制包';制作';由于缺少libpthread.so.0而失败
所以我写了一个程序,在运行OpenWrt姿态调整12.09的Tp-link设备上运行 我在/openwrtsdk../package/myprogram/src/Makefile中成功地编写了Makefile,当我执行“make”时,它运行得很顺利 现在,我在程序中添加了线程,因此我将Makefile配置为:C OpenWrt SDK定制包';制作';由于缺少libpthread.so.0而失败,c,pthreads,openwrt,C,Pthreads,Openwrt,所以我写了一个程序,在运行OpenWrt姿态调整12.09的Tp-link设备上运行 我在/openwrtsdk../package/myprogram/src/Makefile中成功地编写了Makefile,当我执行“make”时,它运行得很顺利 现在,我在程序中添加了线程,因此我将Makefile配置为: # build myprogram executable when user executes "make" LDFLAGS=-pthread myprogram: myprogram.
# build myprogram executable when user executes "make"
LDFLAGS=-pthread
myprogram: myprogram.o
$(CC) $(LDFLAGS) myprogram.o -o myprogram
myprogram.o: myprogram.c
$(CC) $(CFLAGS) -c myprogram.c
# remove object files and executable when user executes "make clean"
clean:
rm *.o myprogram
当我在package/myprogram/src文件夹中“make”时,它会成功编译并在我的电脑上正常运行
现在,当我转到根OpenWrt SDK目录“make”时,我得到一个缺少依赖项的错误:
Package myprogram is missing dependencies for the following libraries:
libpthread.so.0
那么我需要做什么来包含这些依赖项呢
我转到我的OpenWrt SDK根目录并尝试:
./scripts/feeds search libpthread
我得到了这个结果:
./scripts/feeds search libpthread
Search results in feed 'trunk':
libpthread POSIX thread library
我应该安装还是不安装?我不知道我是否做错了什么
我将感谢任何帮助谢谢。在“包装定义”下添加
DEPENDS:=+libpthread
在包定义下添加
DEPENDS:=+libpthread