在Openwrt中添加libsmpp库并更新feeds。
示例代码:
更新feeds: $ cd /path/to/openwrt $ ./scripts/feeds/update -a
安装libsmpp库: $ ./scripts/feeds install libsmpp
配置编译环境: $ make menuconfig
选择需要的libsmpp库: Target images ---> [ ] Build the OpenWrt images ---> [] mipsel ---> [] ramips ---> [] Target Profile (MT7688 based boards) ---> <> smstools
重新编译并安装: $ make -j4 V=s $ make install
将libsmpp库静态链接在可执行文件中: $ gcc -o myapp myapp.c - L/path/to/libsmpp -lsmspp -static
运行可执行文件: $ ./myapp