欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux編譯LVGL仿真器出錯(cuò)問(wèn)題解決

 更新時(shí)間:2022年01月05日 10:24:16   作者:JeckXu666  
大家好,本篇文章主要講的是Linux編譯LVGL仿真器出錯(cuò)問(wèn)題解決,感興趣的同學(xué)趕快來(lái)看一看吧,對(duì)你有幫助的話(huà)記得收藏一下,方便下次瀏覽

一、錯(cuò)誤現(xiàn)象

我在虛擬機(jī)下使用 LVGL 仿真器,編譯仿真器源代碼時(shí)發(fā)生報(bào)錯(cuò)

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: *** 正在等待未完成的任務(wù)....
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
編譯無(wú)法進(jìn)行

二、錯(cuò)誤分析

根據(jù)提示分析錯(cuò)誤,其中 cc: error 提示報(bào)錯(cuò),翻到 Makefile 一看屬于 gcc 編譯器

20220104214639

unrecognized command line option ‘-Wshift-negative-value’ 提示無(wú)法識(shí)別指令,所以分析應(yīng)該是 GCC 版本的原因,可能我的版本不支持這個(gè)指令,解決的方式就是換版本,或者刪掉這個(gè)指令看能不能正常運(yùn)行

三、錯(cuò)誤解決

這里我先試試刪除指令再編譯,先用 grep 找到指令在文件的哪一行

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

20220104215405

編輯文件,刪除對(duì)應(yīng)指令

vim make file

20220104215518

保存后程序編譯

20220104215531

編譯成功,執(zhí)行 demo,可以正常執(zhí)行:

20220104215607

到此這篇關(guān)于Linux編譯LVGL仿真器出錯(cuò)問(wèn)題解決的文章就介紹到這了,更多相關(guān)Linux LVGL仿真器出錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評(píng)論