iis服务器助手广告广告
返回顶部
首页 > 资讯 > 操作系统 >Linux编译LVGL仿真器出错问题解决
  • 470
分享到

Linux编译LVGL仿真器出错问题解决

Linux编译LVGL仿真器出错 2022-06-04 23:06:14 470人浏览 八月长安
摘要

目录一、错误现象二、错误分析三、错误解决一、错误现象 我在虚拟机下使用 LVGL 仿真器,编译仿真器源代码时发生报错 cc: error: unrecognized command line option ‘-Wshif

目录
  • 一、错误现象
  • 二、错误分析
  • 三、错误解决

一、错误现象

我在虚拟机下使用 LVGL 仿真器,编译仿真器源代码时发生报错

cc: error: unrecognized command line option ‘-Wshift-negative-value'
cc: error: unrecognized command line option ‘-Wshift-negative-value'
cc: error: unrecognized command line option ‘-Wshift-negative-value'
Building project file: lvgl/examples/widgets/chart/lv_example_chart_6.c
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/list/lv_example_list_1.o' failed
make: *** [build/obj/lvgl/examples/widgets/list/lv_example_list_1.o] Error 1
make: *** 正在等待未完成的任务....
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/spinner/lv_example_spinner_1.o' failed
make: *** [build/obj/lvgl/examples/widgets/spinner/lv_example_spinner_1.o] Error 1
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/led/lv_example_led_1.o' failed
make: *** [build/obj/lvgl/examples/widgets/led/lv_example_led_1.o] Error 1
cc: error: unrecognized command line option ‘-Wshift-negative-value'
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_3.o' failed
make: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_3.o] Error 1
cc: error: unrecognized command line option ‘-Wshift-negative-value'
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_2.o' failed
make: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_2.o] Error 1
cc: error: unrecognized command line option ‘-Wshift-negative-value'
cc: error: unrecognized command line option ‘-Wshift-negative-value'
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_1.o' failed
make: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_1.o] Error 1
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/checkbox/lv_example_checkbox_1.o' failed
make: *** [build/obj/lvgl/examples/widgets/checkbox/lv_example_checkbox_1.o] Error 1
cc: error: unrecognized command line option ‘-Wshift-negative-value'
Makefile:45: recipe for target 'build/obj/lvgl/examples/widgets/chart/lv_example_chart_6.o' failed
make: *** [build/obj/lvgl/examples/widgets/chart/lv_example_chart_6.o] Error 1
编译无法进行

二、错误分析

根据提示分析错误,其中 cc: error 提示报错,翻到 Makefile 一看属于 GCc 编译器

20220104214639

unrecognized command line option ‘-Wshift-negative-value’ 提示无法识别指令,所以分析应该是 GCC 版本的原因,可能我的版本不支持这个指令,解决的方式就是换版本,或者删掉这个指令看能不能正常运行

三、错误解决

这里我先试试删除指令再编译,先用 grep 找到指令在文件的哪一行

grep -n "\-Wshift\-negative\-value" Makefile

20220104215405

编辑文件,删除对应指令

vim make file

20220104215518

保存后程序编译

20220104215531

编译成功,执行 demo,可以正常执行:

20220104215607

到此这篇关于linux编译LVGL仿真器出错问题解决的文章就介绍到这了,更多相关Linux LVGL仿真器出错内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

--结束END--

本文标题: Linux编译LVGL仿真器出错问题解决

本文链接: https://www.lsjlt.com/news/21549.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作