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] - quick append file(s) to the archive
r[ab][f][u] - replace existing or insert new file(s) into the archive
s - act as ranlib
t - display contents of archive
x[o] -
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] - quick append file(s) to the archive
r[ab][f][u] - replace existing or insert new file(s) into the archive
s - act as ranlib
t - display contents of archive
x[o] -