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