Error compiling simulator with CodeBlocks/Win

I just download Codeblocks (20.3), already have MinGW in path, cloned lvgl (CB/win) simulator from github.

When Compiling, I got following file not find errors:

*C:\codeblocks\lv_sim_codeblocks_win\lv_drivers\display\fbdev.c|9|fatal error: fbdev.h: No such file or directory|
C:\codeblocks\lv_sim_codeblocks_win\lv_drivers\display\monitor.c|9|fatal error: monitor.h: No such file or directory|
C:\codeblocks\lv_sim_codeblocks_win\lv_drivers\display\R61581.c|9|fatal error: R61581.h: No such file or directory|
C:\codeblocks\lv_sim_codeblocks_win\lv_drivers\display\SHARP_MIP.c|43|fatal error: SHARP_MIP.h: No such file or directory|
Cloned as (c:\codeblocks>git clone --recursive
Codeblocks is able to locate the file, but maybe it a config setting.
Could you help.

The includes are not present. i had to re-include all needed folders in the project build config.
Also, the samples internal includes are not correct, i had to replace all occurrences of (#include “…/…/…/lv-examples.h”) with (#include “…/…/lv-examples.h”).
Now it compiles and RUN OK.


It sounds like CodeBlocks didn’t import the project correctly. I will test it again but on my machine it has always worked without problems. Maybe it’s because you installed MinGW separately.

If the header files are not there make sure you pulled the submodule repos from git. The codeblock project also needs lvgl, the drivers, and examples repos. The recursive command didn’t work for me and I had to pull/update them manually. I use Gitkraken and if it hasn’t pulled them it will have a little dot next to the sub modules.

Previously I had problems with your compiler settings being carried over and overwriting my global settings but that doesn’t seem to be the problem if there are missing headers unless I am understanding the problem wrong.

I re-installed codeblocks WITH the compiler and had same result.

The first impression to me is that i pulled a non-released repo. So, I expect things not in-place.
OR, as you said, the git did not pull them right as ordered structure.

The code was compiled and run. If you look at the first error message, it says fbdev.h is not found. I knew i am not going to use fbdev since it is windows. I had to add includes because i want the compiler to go on. I recommend that unneeded code pieces are masked using the config file in the first place.

Yes, did you look in your file explorer to see if the files are there? The codeblocks repo on git doesn’t include the actual files for lvgl it just links through to the repo as a submodule so you need to make sure it is being downloaded as well. Recursive is supposed to grab it but sometimes it doesn’t work. On my computer it doesn’t seem to at least.

The first thing i did was to check if needed files are present. Then analyzed project to find why it did not find. The first iteration was to add includes to project build config. The next was to modify the path “in the code” to point to it. I had both cases.

The demo looks nice.

@excitedbox In this case it seems that all the files are present, but CodeBlocks isn’t importing the settings from our project, therefore the include paths are empty and the build fails.

Is there a fix for it or should I backup the config before updating and then copy it over? I think I am still on 7.2

Probably doing a backup is safest. I’ll clone a fresh copy now and see whether anything strange happens.

I tested it on my normal Windows installation and I don’t see an issue. As long as I clone the submodules, it builds and runs without problems.

I will also try it on my VM (which doesn’t have CodeBlocks installed at the moment) just to rule out existing global settings as the culprit.

It doesn’t seem to happen on my VM either, and that was effectively a fresh copy of Windows. I don’t really know why @alsaleem00 had problems, but maybe it was related to not using the built-in CodeBlocks compiler. :man_shrugging: