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.
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[]),否则报声明和定义不符的错误
