Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win11_PlatfomIO_Build_Issues #52

Closed
TigoTas opened this issue Mar 2, 2023 · 3 comments
Closed

Win11_PlatfomIO_Build_Issues #52

TigoTas opened this issue Mar 2, 2023 · 3 comments

Comments

@TigoTas
Copy link

TigoTas commented Mar 2, 2023

Hi,

First I have to say that the work being done with LVGL is amazing. I hope to contribute to it.

I'm having issues with the porting to PlatformIO, though.

Followed instalation as described on the main page. Also as described here https://code.visualstudio.com/docs/cpp/config-mingw#_prerequisites.

I checked #7 and #17 for possible fixes. But build fails

Any help is appreciated.

I get the following on the terminal:

Executing task: C:\Users\tigo_.platformio\penv\Scripts\platformio.exe run

Processing emulator_64bits (platform: native@^1.1.3)

Verbose mode can be enabled via -v, --verbose option
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 3 compatible libraries
Scanning dependencies...
Dependency Graph
|-- lvgl @ 8.2.0
|-- lv_drivers @ 8.2.0
| |-- lvgl @ 8.2.0
Building in release mode
Compiling .pio\build\emulator_64bits\libcbf\lv_drivers\sdl\sdl.o
: fatal error: SDL2/SDL.h: No such file or directory
compilation terminated.
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\stress\assets\lv_font_montserrat_28_compr_az.o
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\stress\lv_demo_stress.o
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\widgets\assets\img_clothes.o
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\widgets\assets\img_demo_widgets_avatar.o
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\widgets\assets\img_lvgl_logo.o
Compiling .pio\build\emulator_64bits.pio\libdeps\emulator_64bits\lvgl\demos\widgets\lv_demo_widgets.o
Compiling .pio\build\emulator_64bits\hal\sdl2\app_hal.o
*** [.pio\build\emulator_64bits\libcbf\lv_drivers\sdl\sdl.o] Error 1
Compiling .pio\build\emulator_64bits\src\main.o
hal\sdl2\app_hal.c:3:10: fatal error: SDL2/SDL.h: No such file or directory
3 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
compilation terminated.
*** [.pio\build\emulator_64bits\hal\sdl2\app_hal.o] Error 1
============================================== [FAILED] Took 9.67 seconds ==============================================

Environment Status Duration


emulator_64bits FAILED 00:00:09.675
======================================== 1 failed, 0 succeeded in 00:00:09.675 ========================================

  • The terminal process "C:\Users\tigo_.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.
@TigoTas
Copy link
Author

TigoTas commented Mar 2, 2023

Reinstalled everything and got it working.

@TigoTas TigoTas closed this as completed Mar 2, 2023
@fool-cat
Copy link

Hello, if you strictly follow the instructions in readme.md for configuring the environment under Windows and encounter this problem, I guess the issue you may have encountered is that the compiler selection is incorrect. PlatformIO defaults to using the first MinGW compiler in the system environment variables.I am using Win10, but I believe Win11 should be the same.

There are two solutions:

  1. Set the path of the first MinGW compiler in the system environment variables to the MinGW path configured in readme.md.
    image

  2. First, add the include path of the MinGW configured in readme.md to build_flags in platform.ini, for example: -I "D:/msys64/mingw64/include", and then copy libSDL2.a, libSDL2.dll.a, and libSDL2main.a from MinGW to the lib directory of the first MinGW in your system environment variables.
    image

image

@jiahuan-chen
Copy link

thanks fool cat,i successd it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants