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

 更新时间:2022年01月05日 10:24:16   作者:JeckXu666  
大家好,本篇文章主要讲的是Linux编译LVGL仿真器出错问题解决,感兴趣的同学赶快来看一看吧,对你有帮助的话记得收藏一下,方便下次浏览

一、错误现象

我在虚拟机下使用 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仿真器出错内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • Windows下PHP安装路径配置错误导致Apache无法启动的解决方法

    Windows下PHP安装路径配置错误导致Apache无法启动的解决方法

    这篇文章主要介绍了Windows下PHP安装路径配置错误导致Apache无法启动的解决方法,本文可以说是一个引号引发的悲剧,需要的朋友可以参考下
    2014-09-09
  • Linux多线程编程(一)

    Linux多线程编程(一)

    linux多线程设计是指基于Linux操作系统下的多线程设计,包括多任务程序的设计,并发程序设计,网络程序设计,数据共享等。Linux系统下的多线程遵循POSIX线程接口,称为pthread。
    2014-08-08
  • Linux系统清除缓存的方法总结

    Linux系统清除缓存的方法总结

    在本篇文章里小编给大家整理了关于Linux系统清除缓存的方法和实例内容,需要的朋友们参考下。
    2020-01-01
  • Linux流媒体服务器部署流程

    Linux流媒体服务器部署流程

    文章详细介绍了流媒体服务器的部署步骤,包括更新系统、安装依赖组件、编译安装Nginx和RTMP模块、配置Nginx和FFmpeg,以及测试流媒体服务器的搭建
    2025-02-02
  • linux报错INFO:task xxxxxx:634 blocked for more than 120 seconds.三种解决方式

    linux报错INFO:task xxxxxx:634 blocked for more than 120 

    文章描述了一个Linux最小系统运行时出现的“hung_task_timeout_secs”错误,并探讨了三种解决方案:缩小文件系统缓存大小、修改IO调度策略和取消120秒时间限制,通过测试,发现缩减文件系统缓存大小和取消120秒时间限制都可以解决问题
    2025-01-01
  • Linux下升级python和安装pip的详解

    Linux下升级python和安装pip的详解

    今天小编就为大家分享一篇关于Linux下升级python和安装pip的详解,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看吧
    2019-03-03
  • linux rsync的安装与配置

    linux rsync的安装与配置

    rsync是类unix系统下的数据镜像备份工具,从软件的命名上就可以看出来了--remote sync
    2013-06-06
  • 详解ubuntu下安装Docker

    详解ubuntu下安装Docker

    本篇文章主要介绍了ubuntu下安装Docker,详细的介绍了安装Docker的情况,具有一定的参考价值,有需要的一起来了解一下。
    2016-12-12
  • Apache使用.htaccess 屏蔽恶意 User Agent(防蜘蛛)

    Apache使用.htaccess 屏蔽恶意 User Agent(防蜘蛛)

    这篇文章主要介绍了Apache使用.htaccess 屏蔽恶意 User Agent(防蜘蛛),需要的朋友可以参考下
    2016-07-07
  • Linux下Redis的安装和部署

    Linux下Redis的安装和部署

    这篇文章主要介绍了Linux下Redis的安装和部署的相关资料,需要的朋友可以参考下
    2016-02-02

最新评论