openzwave-1.4.164 移植到MTK openwrt-3.10.14 遇到的一些坑
一)wcsdup的编译错误
一)wcsdup的编译错误
http://www.man7.org/linux/man-pages/man3/wcsdup.3.html
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
wcsdup():
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
Since glibc 2.10:
_POSIX_C_SOURCE >= 200809L
Before glibc 2.10:
_GNU_SOURCE
【解决办法】
修改cpp\hidapi\libusb\hid.c,增加如下行
#define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */
修改cpp\hidapi\libusb\hid.c,增加如下行
#define _GNU_SOURCE /* needed for wcsdup() before glibc 2.10 */
二)解决静态库编译问题
Creating vers.cpp
Building vers.o
Linking Static Library
mipsel-openwrt-linux-uclibc-ar: invalid option -- '/'
Usage: mipsel-openwrt-linux-uclibc-ar [emulation options] [-]{dmpqrstx}[
abcDfilMNoPsSTuvV] [member-name] [count] archive-file file...
mipsel-openwrt-linux-uclibc-ar -M [<mri-script]
commands:
d - delete file(s) from the archive
m[ab] - move file(s) in the archive
p - print file(s) found in the archive
q[f] &
Building vers.o
Linking Static Library
mipsel-openwrt-linux-uclibc-ar: invalid option -- '/'
Usage: mipsel-openwrt-linux-uclibc-ar [emulation options] [-]{dmpqrstx}[
abcDfilMNoPsSTuvV] [member-name] [count] archive-file file...
mipsel-openwrt-linux-uclibc-ar -M [<mri-script]
commands:
d - delete file(s) from the archive
m[ab] - move file(s) in the archive
p - print file(s) found in the archive
q[f] &

本文详细记录了在将openzwave-1.4.164移植到MTK基于OpenWRT 3.10.14的过程中遇到的编译错误,包括wcsdup的编译错误、静态库链接问题、动态库链接问题以及MinOZW编译问题,并提供了相应的解决办法。
981

被折叠的 条评论
为什么被折叠?



