LittleV GUI相關總結



The whole graphics library project consists of a few repostories:
  • lvgl the graphics library itself
  • lv_examples tutorials and example GUI applications
  • lv_boards ready to use project on various development boards and microcontrollers
  • lv_drivers drivers for common touch pad and display controllers
  • lv_utils image and font converter utilities
  • pc_simulator a cross platform simulator project to run LittlevGL on PC


一、PC端模擬器開發環境搭建
軟件下載地址:
1.Eclipse CDT
eclipse-cpp-oxygen-R-win32-x86_64.zip
2.SDL2
SDL2-devel-2.0.7-mingw.tar.gz
3.MinGW-w64
x86_64-7.2.0-release-win32-sjlj-rt_v5-rev0.7z

1、Install Eclipse CDT
Eclipse CDT is C/C++ IDE. You can use other IDEs as well but in this tutorial the configuration for Eclipse CDT is shown.
Eclipse is a Java based software therefore be sure Jave Runtime Environment is installed on your system. 
On linux: sudo apt-get install default-jre
You can download Eclipse's CDT from: https://eclipse.org/cdt/. Start the nstaller and choose *Eclipse CDT* from the list

2、Install MinGW
官方MinGW很難下載,選擇MinGW-w64替代。解壓到某個目錄,並且添加環境變量D:\mingw64\bin,打開CMD,輸入gcc -v測試是否添加成功。重命名mingw64\bin下的mingw32-make.exe爲make.exe

3、Install SDL 2
1)Download the development libraries of SDL. 
Go to https://www.libsdl.org/download-2.0.php and download Development Libraries: SDL2-devel-2.0.5-mingw.tar.gz
2)Uncompress the file and go to x86_64-w64-mingw32 directory (for 64 bit MinGW) or to i686-w64-mingw32 (for 32 bit MinGW)

3)Copy x86_64-w64-mingw32/include/SDL2 folder to D:\mingw64\x86_64-w64-mingw32/include

4)Copy x86_64-w64-mingw32/lib/ content to D:\mingw64\x86_64-w64-mingw32\lib

5)Copy x86_64-w64-mingw32/bin/SDL2.dll to {eclipse_worksapce}/pc_simulator/Debug/. Do it later when Eclipse is installed.


4、Import pre-configed project to Eclipse
 File->Import and choose General->Existing project into Workspace

注:這裏導入後,需要對工程的properties做一些修改,否則會出現
undefined reference to `WinMain@16'錯誤


5、Compile and Run
編譯前需要修改main.c裏的int main(void)爲int main(int argc, char *argv[]),否則報聲明和定義不符的錯誤

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章