文章詳情頁
Linux編譯LVGL仿真器出錯問題解決
瀏覽:63日期:2023-03-07 14:40:09
目錄
- 一、錯誤現象
- 二、錯誤分析
- 三、錯誤解決
一、錯誤現象
我在虛擬機下使用 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.cMakefile:45: recipe for target "build/obj/lvgl/examples/widgets/list/lv_example_list_1.o" failedmake: *** [build/obj/lvgl/examples/widgets/list/lv_example_list_1.o] Error 1make: *** 正在等待未完成的任務....Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/spinner/lv_example_spinner_1.o" failedmake: *** [build/obj/lvgl/examples/widgets/spinner/lv_example_spinner_1.o] Error 1Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/led/lv_example_led_1.o" failedmake: *** [build/obj/lvgl/examples/widgets/led/lv_example_led_1.o] Error 1cc: error: unrecognized command line option ‘-Wshift-negative-value"Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_3.o" failedmake: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_3.o] Error 1cc: error: unrecognized command line option ‘-Wshift-negative-value"Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_2.o" failedmake: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_2.o] Error 1cc: 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" failedmake: *** [build/obj/lvgl/examples/widgets/textarea/lv_example_textarea_1.o] Error 1Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/checkbox/lv_example_checkbox_1.o" failedmake: *** [build/obj/lvgl/examples/widgets/checkbox/lv_example_checkbox_1.o] Error 1cc: error: unrecognized command line option ‘-Wshift-negative-value"Makefile:45: recipe for target "build/obj/lvgl/examples/widgets/chart/lv_example_chart_6.o" failedmake: *** [build/obj/lvgl/examples/widgets/chart/lv_example_chart_6.o] Error 1
編譯無法進行
二、錯誤分析
根據提示分析錯誤,其中 cc: error 提示報錯,翻到 Makefile 一看屬于 gcc 編譯器
unrecognized command line option ‘-Wshift-negative-value’ 提示無法識別指令,所以分析應該是 GCC 版本的原因,可能我的版本不支持這個指令,解決的方式就是換版本,或者刪掉這個指令看能不能正常運行
三、錯誤解決
這里我先試試刪除指令再編譯,先用 grep 找到指令在文件的哪一行
grep -n "\-Wshift\-negative\-value" Makefile
編輯文件,刪除對應指令
vim make file
保存后程序編譯
編譯成功,執行 demo,可以正常執行:
到此這篇關于Linux編譯LVGL仿真器出錯問題解決的文章就介紹到這了,更多相關Linux LVGL仿真器出錯內容請搜索以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持!
相關文章:
1. 通過圖文講解Tomcat部署war包的方法步驟2. Windows Server 2019 安裝后的一些設置收集3. 解決“WARNINGThe remote SSH server rejected X11 forwarding request.“警告(推薦)4. Windows Server 2008 R2 IIS7.5配置FTP圖文教程5. Centos8使用Squid配置代理服務器的詳細過程6. Apache Doris Join 優化原理詳解7. Linux中各個目錄的作用與內容8. 解決Vmware虛擬機安裝centos8報錯“Section %Packages Does Not End With %End. Pane Is Dead”9. tomcat下部署jenkins的實現方法10. Tomcat starup.bat腳本開機自啟動的實現
排行榜
