Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C OpenWrt SDK定制包';制作';由于缺少libpthread.so.0而失败_C_Pthreads_Openwrt - Fatal编程技术网

C OpenWrt SDK定制包';制作';由于缺少libpthread.so.0而失败

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.

所以我写了一个程序,在运行OpenWrt姿态调整12.09的Tp-link设备上运行

我在/openwrtsdk../package/myprogram/src/Makefile中成功地编写了Makefile,当我执行“make”时,它运行得很顺利

现在,我在程序中添加了线程,因此我将Makefile配置为:

# 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