lvgl / lv_port_win_codeblocks

Windows PC simulator project for LVGL embedded GUI Library
MIT License
129 stars 79 forks source link

VersionHelpers.h: No such file or directory #16

Closed egonbeermat closed 2 years ago

egonbeermat commented 3 years ago

Trying to build and run the simulator, got fatal build error:

VersionHelpers.h: No such file or directory

Steps taken: downloaded and installed CodeBlocks 20.03 with MinGW. Downloaded the simulator project and LVGL files:

D:\Development\Arduino>git clone https://github.com/lvgl/lv_sim_codeblocks_win.git
Cloning into 'lv_sim_codeblocks_win'...
remote: Enumerating objects: 175, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 175 (delta 1), reused 8 (delta 1), pack-reused 160
Receiving objects: 100% (175/175), 162.82 KiB | 0 bytes/s, done.
Resolving deltas: 100% (102/102), done.

D:\Development\Arduino>cd lv_sim_codeblocks_win

D:\Development\Arduino\lv_sim_codeblocks_win>git submodule update --init --recursive
Submodule 'lv_drivers' (https://github.com/littlevgl/lv_drivers) registered for path 'lv_drivers'
Submodule 'lv_examples' (https://github.com/littlevgl/lv_examples) registered for path 'lv_examples'
Submodule 'lvgl' (https://github.com/littlevgl/lvgl) registered for path 'lvgl'
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lv_drivers'...
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lv_examples'...
Cloning into 'D:/Development/Arduino/lv_sim_codeblocks_win/lvgl'...
Submodule path 'lv_drivers': checked out '5b78b785a9b28b9c86c7af8ef1bc76ba2d49107e'
Submodule path 'lv_examples': checked out '1fa0de125f886bad2c9b0b4c399e156129e40fca'
Submodule path 'lvgl': checked out '77c61aa2975ee55f9ac2c88feeccce3c327ae0c3'

D:\Development\Arduino\lv_sim_codeblocks_win>

Opened LittlevGL.cbp in CodeBlocks and did Build and Run:

=== Build: Debug in LittlevGL (compiler: GNU GCC Compiler) ===
D:\Development\Arduino\lv_sim_codeblocks_win\lv_drivers\win32drv\win32drv.c|15|fatal error: VersionHelpers.h: No such file or directory
=== Build finished: 1 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===

Not even sure where to begin resolving....

embeddedt commented 3 years ago

I can't reproduce this.

VersionHelpers.h is in C:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\include on my system (Windows 8.1).

What version of Windows are you using?

egonbeermat commented 3 years ago

Windows 10 Pro, 64 bit. I have VersionHelpers.h in that directory,too. The LVGL v7 CodeBlocks simulator project builds just fine, and it doesn't seem any different from the v8 project with regard to this particular issue. I'm not a heavy CodeBlocks user, I'm only here for the simulator, but it seems like some configuration issue, but I don't know what - the v7 simulator worked out the box, so I don't recall messing with any configuration.

embeddedt commented 3 years ago

v7 used my pretty simplistic Windows driver, whereas v8 uses win32drv by Kenji Mouri, which is much faster and also supports the keyboard/mousewheel. However, it also depends on this header file.

I'll try setting it up on a fresh VM and see if I get the same issue.

egonbeermat commented 3 years ago

Thanks!

embeddedt commented 3 years ago

Sorry for the delay in getting back to this.

Unfortunately it also worked on my Windows 10 VM. The only explanation I can see here is that for some reason you have CodeBlocks installed differently (though in that case, I'm not sure why the v7 simulator worked).

Personally, I find the full Visual Studio (not Code) to be somewhat bloated, but we do have a project for it as well. It might be worth a try if CodeBlocks is giving this issue.

dronecz commented 3 years ago

I wanted to try v8 example so I update this repo and run in same issue as @egonbeermat.

I uninstalled Codeblocks as I did not have VersionHelpers.h in C:\Program Files\CodeBlocks\MinGW\x86_64-w64-mingw32\include and installed one with MinGW included but this did not solved the issue.

After bit of GoogleFu I found some post where they recommend to include path for missing file so I did that and now I can Build and run example. I can not use mouse and keyboard in the example though.

image

EDIT:

I realized after posting here that I had MinGW installed separately and after removing folder with it, I could not build project anymore and after setting right path to GCC compiler in Program Files I can build project without including path to VersionHelpers.h

Still no keyboard and mouse.

embeddedt commented 3 years ago

I had MinGW installed separately and after removing folder with it, I could not build project anymore and after setting right path to GCC compiler in Program Files I can build project without including path to VersionHelpers.h

I'll add a note to the README that having a separate MinGW installation may cause issues. It's also possible that your MinGW version is older than the one CodeBlocks provides. In any case, glad this mystery was resolved.

Still no keyboard and mouse.

Strange. As far as I know, the new Windows driver always enables mouse and keyboard support.

@MouriNaruto Could you take a look at this, please?

MouriNaruto commented 3 years ago

@embeddedt Got it, I need some time to check it.

MouriNaruto commented 3 years ago

@embeddedt @dronecz

Still no keyboard and mouse.

I have just create a PR in lv_drivers. I have tested under lv_sim_codeblocks_win and solved the issue.

image

dronecz commented 3 years ago

Thanks @MouriNaruto for this. I manually copied your changes and it works now.

One thing which I did not expect is that scroll wheel act as tabulator key. If I scroll, I will jump from object to object (see gif). Is this wanted behavior? I would expect that scroll wheel will work just in area where scrollbar is and not at "header" and "footer" of the example.

lvgl_example

MouriNaruto commented 3 years ago

@dronecz

I think it can help you.

https://github.com/lvgl/lvgl/issues/2276#issuecomment-852444921

dronecz commented 3 years ago

Ok, thank you for clarification @MouriNaruto . 🙂

egonbeermat commented 2 years ago

Ok, I completely uninstalled CodeBlocks and MinGW (which was also in a separate folder outside of CodeBlocks, as identified above), and reinstalled the MinGW version of CodeBlocks, and that seemed to do the trick. I only use those for LVGL simulator, so I'm wondering if the previous setup I had was due to install instructions from a previous version? Regardless, thanks for the help in getting to the bottom of this!

embeddedt commented 2 years ago

I only use those for LVGL simulator, so I'm wondering if the previous setup I had was due to install instructions from a previous version?

The instructions haven't changed since the repository was created, besides being more explicit about using the MinGW version, so I have no idea why/how you ended up with that setup. :confused:

I've added a note to the README that using a separate installation may cause issues.