当前位置: 首页 > news >正文

建设企业网站价钱搜索引擎排名的三大指标

建设企业网站价钱,搜索引擎排名的三大指标,怎么做色情网站不被发现,专业集团门户网站建设费用背景 之前wiki 14、【OS】【Nuttx】Nsh中运行第一个程序 都是用 make 构建,准备切换 cmake 进行构建,方便后续扩展开发 Nuttx cmake 适配 nuttx项目路径下输入 make distclean,清除之前工程配置 adminpcadminpc:~/nuttx_pdt/nuttx$ make …

背景

之前wiki
14、【OS】【Nuttx】Nsh中运行第一个程序
都是用 make 构建,准备切换 cmake 进行构建,方便后续扩展开发

Nuttx cmake 适配

nuttx项目路径下输入 make distclean,清除之前工程配置

adminpc@adminpc:~/nuttx_pdt/nuttx$ make distclean

接着输入 cmake 构建命令,发现没找到 python3-kconfiglib, 该库用于解析和操作 Linux 内核配置系统(Kconfig),可以让用户通过 python 实现和 Kconfig 文件的交互

adminpc@adminpc:~/nuttx_pdt/nuttx$ cmake -S . -B build -DBOARD_CONFIG=sim:myapp
CMake Error at CMakeLists.txt:88 (message):Kconfig environment depends on kconfiglib, Please install:$ sudo apt install python3-kconfiglib-- Configuring incomplete, errors occurred!

安装,发现已经安装过,但还是显示找不到该库

adminpc@adminpc:~/nuttx_pdt/nuttx$ sudo apt install python3-kconfiglib
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-kconfiglib is already the newest version (14.1.0-3).
0 upgraded, 0 newly installed, 0 to remove and 258 not upgraded.

查看报错原因,发现和 olddefconfig 脚本找不到有关

在这里插入图片描述
输入命令 dpkg -L python3-kconfiglib,查看 kconfiglib 库的位置,可以找到该脚本

adminpc@adminpc:~/nuttx_pdt/nuttx$ dpkg -L python3-kconfiglib

在这里插入图片描述
查看该文件权限,发现没有可执行权限,很明显这个 olddefconfig.py 就是个库文件,不是用来做可执行文件的,所以得在外面做一层封装
在这里插入图片描述
查看 nuttx_kconfig.cmake 脚本,可发现把 olddefconfig 和 setconfig 作为了可执行脚本进行使用
在这里插入图片描述

将这俩 py 文件封装成可执行的 shell 脚本,在 bash 中输入如下命令,将在 /usr/local/bin 目录下,生成两个可执行脚本,这俩可执行脚本指向 kconfiglib 库

sudo tee /usr/local/bin/olddefconfig >/dev/null <<EOL
#!/bin/sh
exec python3 /usr/lib/python3/dist-packages/olddefconfig.py "\$@"
EOL
sudo chmod +x /usr/local/bin/olddefconfig
sudo tee /usr/local/bin/setconfig >/dev/null <<EOL
#!/bin/sh
exec python3 /usr/lib/python3/dist-packages/setconfig.py "\$@"
EOL
sudo chmod +x /usr/local/bin/setconfig

另外,为了防止 find_program 找不到该可执行文件,可直接指定路径

find_program(KCONFIGLIB /usr/local/bin/olddefconfig)

Nuttx app cmake 适配

这里基于之前wiki已经配置好的工程,不熟悉的可参考
15、【OS】【Nuttx】OS裁剪,运行指定程序,周期打印当前任务

在 nuttx-app 路径下添加 myapp 路径
在这里插入图片描述
myapp路径下新建CMakeLists.txt文件,输入内容,并修改 Kconfig,添加 cmake 配置
在这里插入图片描述

// CMakeLists.txt
if(CONFIG_MYAPP)nuttx_add_application(NAME${CONFIG_MYAPP_PROGNAME}SRCSmyapp_main.cSTACKSIZE${CONFIG_MYAPP_STACKSIZE}PRIORITY${CONFIG_MYAPP_PRIORITY})
endif()
# Kconfig
config MYAPPbool "My Application"default nhelpThis is a description of your applicationif MYAPPconfig MYAPP_PROGNAMEstring "Program name"default "myapp"---help---This is the name of the program that will be used when the NSH ELFprogram is installed.config MYAPP_PRIORITYint "myapp task priority"default 100config MYAPP_STACKSIZEint "myapp stack size"default DEFAULT_TASK_STACKSIZEendif

执行 cmake 构建

配置 cmake 工程

adminpc@adminpc:~/nuttx_pdt/nuttx$ cmake -S . -B build -DBOARD_CONFIG=sim:myapp
-- Initializing NuttXSelect HOST_LINUX=ySelect HOST_X86_64=y
--   CMake:  3.28.3
--   Board:  sim
--   Config: myapp
--   Appdir: /home/adminpc/nuttx_pdt/nuttx-apps
-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (2.2s)
-- Generating done (0.3s)
-- Build files have been written to: /home/adminpc/nuttx_pdt/nuttx/build

执行cmake构建

cmake --build build/

构建成功
在这里插入图片描述
build目录下出现熟悉的身影
在这里插入图片描述
可以正常执行
在这里插入图片描述

http://www.dt0577.cn/news/49219.html

相关文章:

  • 柳州网站建设psn118台州seo排名公司
  • 请seo的人帮做网站排名网站权重划分
  • wordpress wp_handle_uploadseo简介
  • 文创产品设计就业前景东莞关键词排名快速优化
  • 景安 怎么把网站做别名什么是新媒体营销
  • 深圳做外贸网站云搜索网页版入口
  • 网站建设排名优化技巧网站创建流程
  • 建网站要多少钱用自己的服务器百度收录的网站
  • 公司网站建设一定要求原图吗怎样做一个自己的网站
  • 网站建设一条龙服务网站seo优化公司
  • 爱淘宝网页网站建设推广app赚佣金平台
  • 有哪些做网站好的公司好设计网站大全
  • 我的网站百度找不到网站源码下载
  • wordpress renderview移动端排名优化软件
  • 管理咨询有限公司长沙seo 优化选智投未来no1
  • 网站开发设计书合肥网站优化
  • 让别人做网站的步骤seo自动发布外链工具
  • 做独立电商网站seo网站诊断流程
  • 旅游网站的设计方案怎么做公司网站制作网络公司
  • github托管wordpress上海单个关键词优化
  • 企业建设网站的作用日本搜索引擎naver入口
  • 怎么自己做网站排名seo推广官网
  • 长春网站建设首选网诚传媒_网站推广怎么弄
  • 企业网站备案 名称万江专业网站快速排名
  • 珠海疫情最新消息公布seo教程网站优化
  • 济南 论坛网站建设win7优化大师官方网站
  • 备案用的网站建设方案书前端seo是什么
  • 最好网站设计案例搜索引擎优化策略
  • 南通科技网站建设成都推广系统
  • 郑州医疗网站开发国产长尾关键词拘挖掘