zoukankan      html  css  js  c++  java
  • iw工具源码编译

    iw官网源码地址:
    git tag 查看版本
    git checkout v3.11 选择3.11版本
    git branch -a 查看目前所在版本
    依赖库libnl-3.2.23下载:
    git clone git://git.infradead.org/users/tgr/libnl.git
    git checkout libnl3_2_23

    libnl-3.2.23编译 :
    ./autogen.sh //生成 comfig等文件
    ./configure CC=xxx-gcc --prefix=/your-release-path/release --host=arm-linux
    make & make install
    (CC=交叉编译器,--prefix=临时发布的路径,--host=交叉编译器适用的主机类型,在宿主机uname -m查看)
    此时在 临时发布的路径/your-release-path/release目录里可看到编译好的库
    报错处理:
    addr.c:1027:8: error: 'AF_RDS' undeclared here (not in a function)
    内核版本不匹配,按照Internet协议族的定义自己加个 #define AF_RDS 21

    iw编译:
    export PKG_CONFIG_PATH=/ your-release-path/release/lib/pkgconfig:$PKG_CONFIG_PATH
    (设置环境变量,把libnl发布的文件中lib/pkgconfig加入,不然iw找不到libnl的库)
    echo $PKG_CONFIG_PATH
    (查看环境变量是否设置成功,因是临时的,关闭窗口后则失效)
    make CC=xxx-gcc
    报错处理:
    undefined reference to `pthread_rwlock_wrlock' ...
    undefined reference to `lrint'
    在Makefile中添加-lpthread -lm:
    ----------------------------------
     NL3FOUND = N
     CFLAGS += -DCONFIG_LIBNL30
    #LIBS += -lnl-genl-3 (删掉此行)
    LIBS += -lnl-genl-3 -lpthread -lm (添加此行)
     NLLIBNAME = libnl-3.0
    --------------------------------------
    作者:柒月
    Q群 :2122210(嵌入式/机器学习)
  • 相关阅读:
    邮件发送工具类
    redis在项目中配置
    搭建zookeeper集群
    activeMQ安装
    solr安装配置中文分词IK
    reids安装
    jdk/tomcat/mysql在linux下安装
    使用poi进行excel导入
    linux 大杂烩
    找包网址
  • 原文地址:https://www.cnblogs.com/Ph-one/p/13852661.html
Copyright © 2011-2022 走看看