Linux編譯LVGL仿真器出錯(cuò)問(wèn)題解決
一、錯(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 編譯器
unrecognized command line option ‘-Wshift-negative-value’ 提示無(wú)法識(shí)別指令,所以分析應(yīng)該是 GCC 版本的原因,可能我的版本不支持這個(gè)指令,解決的方式就是換版本,或者刪掉這個(gè)指令看能不能正常運(yùn)行
三、錯(cuò)誤解決
這里我先試試刪除指令再編譯,先用 grep 找到指令在文件的哪一行
grep -n "\-Wshift\-negative\-value" Makefile
編輯文件,刪除對(duì)應(yīng)指令
vim make file
保存后程序編譯
編譯成功,執(zhí)行 demo,可以正常執(zhí)行:
到此這篇關(guān)于Linux編譯LVGL仿真器出錯(cuò)問(wèn)題解決的文章就介紹到這了,更多相關(guān)Linux LVGL仿真器出錯(cuò)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
Linux服務(wù)器和docker時(shí)區(qū)修改問(wèn)題
這篇文章主要介紹了Linux服務(wù)器和docker時(shí)區(qū)修改問(wèn)題,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2023-06-06centos yum php 7.x 無(wú)需刪除升級(jí)的方法
下面小編就為大家分享一篇centos yum php 7.x 無(wú)需刪除升級(jí)的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2018-03-03Linux之多線(xiàn)程以及多線(xiàn)程并發(fā)訪(fǎng)問(wèn)同一塊內(nèi)存的處理問(wèn)題
這篇文章主要介紹了Linux之多線(xiàn)程以及多線(xiàn)程并發(fā)訪(fǎng)問(wèn)同一塊內(nèi)存的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03CentOS6.5下Tomcat7 Nginx Redis配置步驟教程詳解
這篇文章主要介紹了CentOS6.5下Tomcat7 Nginx Redis配置步驟,本文給大家介紹的非常詳細(xì),具有參考借鑒價(jià)值,需要的朋友可以參考下2016-10-10Linux VPS/服務(wù)器上輕松導(dǎo)入、導(dǎo)出MySQL數(shù)據(jù)庫(kù)的幾種方法
隨著網(wǎng)站的運(yùn)行MySQL數(shù)據(jù)庫(kù)也越來(lái)越大,備份問(wèn)題也日益凸顯,使用phpmyadmin導(dǎo)出或?qū)霑r(shí)可能會(huì)因?yàn)槌瑫r(shí)文件過(guò)大等原因無(wú)法導(dǎo)入或?qū)С觥?/div> 2010-12-12用shell命令刪除網(wǎng)站最新nb掛馬的方法與代碼
教你刪除網(wǎng)站最新NB掛馬最近發(fā)現(xiàn) 很多網(wǎng)站被掛了木馬,會(huì)在頁(yè)面中生成如下代碼。2010-02-02最新評(píng)論