Unable to get simulator running in Win7/Eclipse/MinGW

Description

I am unable to get the eclipse SDL simulator project running. I believe this is an issue with how I’ve installed the SDL library but I am unable to figure out how to get it going.

I have tried re-installing with mingw-w64-install.exe

I dropped the libs into the libs, SDL2 into include per the tutorial.

I am using Eclipse:
Eclipse IDE for C/C++ Developers
Version: 2019-09 R (4.13.0)
Build id: 20190917-1200

Info: Internal Builder is used for build
gcc -o pc_simulator “lv_drivers\display\R61581.o” “lv_drivers\display\SHARP_MIP.o” “lv_drivers\display\SSD1963.o” “lv_drivers\display\ST7565.o” “lv_drivers\display\UC1610.o” “lv_drivers\display\fbdev.o” “lv_drivers\display\monitor.o” “lv_drivers\indev\AD_touch.o” “lv_drivers\indev\FT5406EE8.o” “lv_drivers\indev\XPT2046.o” “lv_drivers\indev\evdev.o” “lv_drivers\indev\keyboard.o” “lv_drivers\indev\libinput.o” “lv_drivers\indev\mouse.o” “lv_drivers\indev\mousewheel.o” “lv_drivers\win_drv.o” “lv_examples\lv_apps\benchmark\benchmark.o” “lv_examples\lv_apps\benchmark\benchmark_bg.o” “lv_examples\lv_apps\demo\demo.o” “lv_examples\lv_apps\demo\img_bubble_pattern.o” “lv_examples\lv_apps\sysmon\sysmon.o” “lv_examples\lv_apps\terminal\terminal.o” “lv_examples\lv_apps\tpcal\tpcal.o” “lv_examples\lv_tests\lv_test_group\lv_test_group.o” “lv_examples\lv_tests\lv_test_misc\lv_test_task.o” “lv_examples\lv_tests\lv_test_obj\lv_test_obj.o” “lv_examples\lv_tests\lv_test_objx\lv_test_arc\lv_test_arc.o” “lv_examples\lv_tests\lv_test_objx\lv_test_bar\lv_test_bar.o” “lv_examples\lv_tests\lv_test_objx\lv_test_btn\lv_test_btn.o” “lv_examples\lv_tests\lv_test_objx\lv_test_btnm\lv_test_btnm.o” “lv_examples\lv_tests\lv_test_objx\lv_test_canvas\lv_test_canvas.o” “lv_examples\lv_tests\lv_test_objx\lv_test_cb\lv_test_cb.o” “lv_examples\lv_tests\lv_test_objx\lv_test_chart\lv_test_chart.o” “lv_examples\lv_tests\lv_test_objx\lv_test_cont\lv_test_cont.o” “lv_examples\lv_tests\lv_test_objx\lv_test_ddlist\lv_test_ddlist.o” “lv_examples\lv_tests\lv_test_objx\lv_test_gauge\lv_test_gauge.o” “lv_examples\lv_tests\lv_test_objx\lv_test_img\img_flower_icon.o” “lv_examples\lv_tests\lv_test_objx\lv_test_img\lv_test_img.o” “lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_1.o” “lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_2.o” “lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_3.o” “lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\imgbtn_img_4.o” “lv_examples\lv_tests\lv_test_objx\lv_test_imgbtn\lv_test_imgbtn.o” “lv_examples\lv_tests\lv_test_objx\lv_test_kb\lv_test_kb.o” “lv_examples\lv_tests\lv_test_objx\lv_test_label\lv_test_label.o” “lv_examples\lv_tests\lv_test_objx\lv_test_led\lv_test_led.o” “lv_examples\lv_tests\lv_test_objx\lv_test_line\lv_test_line.o” “lv_examples\lv_tests\lv_test_objx\lv_test_list\lv_test_list.o” “lv_examples\lv_tests\lv_test_objx\lv_test_lmeter\lv_test_lmeter.o” “lv_examples\lv_tests\lv_test_objx\lv_test_mbox\lv_test_mbox.o” “lv_examples\lv_tests\lv_test_objx\lv_test_page\lv_test_page.o” “lv_examples\lv_tests\lv_test_objx\lv_test_preload\lv_test_preload.o” “lv_examples\lv_tests\lv_test_objx\lv_test_roller\lv_test_roller.o” “lv_examples\lv_tests\lv_test_objx\lv_test_slider\lv_test_slider.o” “lv_examples\lv_tests\lv_test_objx\lv_test_sw\lv_test_sw.o” “lv_examples\lv_tests\lv_test_objx\lv_test_ta\lv_test_ta.o” “lv_examples\lv_tests\lv_test_objx\lv_test_table\lv_test_table.o” “lv_examples\lv_tests\lv_test_objx\lv_test_tabview\lv_test_tabview.o” “lv_examples\lv_tests\lv_test_objx\lv_test_tileview\lv_test_tileview.o” “lv_examples\lv_tests\lv_test_objx\lv_test_win\lv_test_win.o” “lv_examples\lv_tests\lv_test_stress\lv_test_stress.o” “lv_examples\lv_tests\lv_test_theme\lv_test_theme_1.o” “lv_examples\lv_tests\lv_test_theme\lv_test_theme_2.o” “lv_examples\lv_tutorial\10_keyboard\lv_tutorial_keyboard.o” “lv_examples\lv_tutorial\1_hello_world\lv_tutorial_hello_world.o” “lv_examples\lv_tutorial\2_objects\lv_tutorial_objects.o” “lv_examples\lv_tutorial\3_styles\lv_tutorial_styles.o” “lv_examples\lv_tutorial\4_themes\lv_tutorial_themes.o” “lv_examples\lv_tutorial\5_antialiasing\apple_icon_alpha.o” “lv_examples\lv_tutorial\5_antialiasing\apple_icon_chroma.o” “lv_examples\lv_tutorial\5_antialiasing\lv_tutorial_antialiasing.o” “lv_examples\lv_tutorial\6_images\flower_icon_alpha.o” “lv_examples\lv_tutorial\6_images\lv_tutorial_images.o” “lv_examples\lv_tutorial\6_images\red_flower.o” “lv_examples\lv_tutorial\6_images\red_rose_16.o” “lv_examples\lv_tutorial\7_fonts\arial_20.o” “lv_examples\lv_tutorial\7_fonts\lv_tutorial_fonts.o” “lv_examples\lv_tutorial\8_animations\lv_tutorial_animations.o” “lv_examples\lv_tutorial\9_responsive\lv_tutorial_responsive.o” “lvgl\porting\lv_port_disp_template.o” “lvgl\porting\lv_port_fs_template.o” “lvgl\porting\lv_port_indev_template.o” “lvgl\src\lv_core\lv_disp.o” “lvgl\src\lv_core\lv_group.o” “lvgl\src\lv_core\lv_indev.o” “lvgl\src\lv_core\lv_obj.o” “lvgl\src\lv_core\lv_refr.o” “lvgl\src\lv_core\lv_style.o” “lvgl\src\lv_draw\lv_draw.o” “lvgl\src\lv_draw\lv_draw_arc.o” “lvgl\src\lv_draw\lv_draw_basic.o” “lvgl\src\lv_draw\lv_draw_img.o” “lvgl\src\lv_draw\lv_draw_label.o” “lvgl\src\lv_draw\lv_draw_line.o” “lvgl\src\lv_draw\lv_draw_rect.o” “lvgl\src\lv_draw\lv_draw_triangle.o” “lvgl\src\lv_draw\lv_img_cache.o” “lvgl\src\lv_draw\lv_img_decoder.o” “lvgl\src\lv_font\lv_font.o” “lvgl\src\lv_font\lv_font_fmt_txt.o” “lvgl\src\lv_font\lv_font_roboto_12.o” “lvgl\src\lv_font\lv_font_roboto_16.o” “lvgl\src\lv_font\lv_font_roboto_22.o” “lvgl\src\lv_font\lv_font_roboto_28.o” “lvgl\src\lv_font\lv_font_unscii_8.o” “lvgl\src\lv_hal\lv_hal_disp.o” “lvgl\src\lv_hal\lv_hal_indev.o” “lvgl\src\lv_hal\lv_hal_tick.o” “lvgl\src\lv_misc\lv_anim.o” “lvgl\src\lv_misc\lv_area.o” “lvgl\src\lv_misc\lv_async.o” “lvgl\src\lv_misc\lv_circ.o” “lvgl\src\lv_misc\lv_color.o” “lvgl\src\lv_misc\lv_fs.o” “lvgl\src\lv_misc\lv_gc.o” “lvgl\src\lv_misc\lv_ll.o” “lvgl\src\lv_misc\lv_log.o” “lvgl\src\lv_misc\lv_math.o” “lvgl\src\lv_misc\lv_mem.o” “lvgl\src\lv_misc\lv_task.o” “lvgl\src\lv_misc\lv_templ.o” “lvgl\src\lv_misc\lv_txt.o” “lvgl\src\lv_misc\lv_utils.o” “lvgl\src\lv_objx\lv_arc.o” “lvgl\src\lv_objx\lv_bar.o” “lvgl\src\lv_objx\lv_btn.o” “lvgl\src\lv_objx\lv_btnm.o” “lvgl\src\lv_objx\lv_calendar.o” “lvgl\src\lv_objx\lv_canvas.o” “lvgl\src\lv_objx\lv_cb.o” “lvgl\src\lv_objx\lv_chart.o” “lvgl\src\lv_objx\lv_cont.o” “lvgl\src\lv_objx\lv_ddlist.o” “lvgl\src\lv_objx\lv_gauge.o” “lvgl\src\lv_objx\lv_img.o” “lvgl\src\lv_objx\lv_imgbtn.o” “lvgl\src\lv_objx\lv_kb.o” “lvgl\src\lv_objx\lv_label.o” “lvgl\src\lv_objx\lv_led.o” “lvgl\src\lv_objx\lv_line.o” “lvgl\src\lv_objx\lv_list.o” “lvgl\src\lv_objx\lv_lmeter.o” “lvgl\src\lv_objx\lv_mbox.o” “lvgl\src\lv_objx\lv_objx_templ.o” “lvgl\src\lv_objx\lv_page.o” “lvgl\src\lv_objx\lv_preload.o” “lvgl\src\lv_objx\lv_roller.o” “lvgl\src\lv_objx\lv_slider.o” “lvgl\src\lv_objx\lv_spinbox.o” “lvgl\src\lv_objx\lv_sw.o” “lvgl\src\lv_objx\lv_ta.o” “lvgl\src\lv_objx\lv_table.o” “lvgl\src\lv_objx\lv_tabview.o” “lvgl\src\lv_objx\lv_tileview.o” “lvgl\src\lv_objx\lv_win.o” “lvgl\src\lv_themes\lv_theme.o” “lvgl\src\lv_themes\lv_theme_alien.o” “lvgl\src\lv_themes\lv_theme_default.o” “lvgl\src\lv_themes\lv_theme_material.o” “lvgl\src\lv_themes\lv_theme_mono.o” “lvgl\src\lv_themes\lv_theme_nemo.o” “lvgl\src\lv_themes\lv_theme_night.o” “lvgl\src\lv_themes\lv_theme_templ.o” “lvgl\src\lv_themes\lv_theme_zen.o” main.o mouse_cursor_icon.o -lSDL2main -lSDL2 -lm
lv_drivers\display\monitor.o: In function monitor_init': ./lv_drivers/display/monitor.c:117: undefined reference toSDL_CreateThread’
…/lv_drivers/display/monitor.c:280: undefined reference to SDL_DestroyTexture' ./lv_drivers/display/monitor.c:281: undefined reference toSDL_DestroyRenderer’
./lv_drivers/display/monitor.c:282: undefined reference to SDL_DestroyWindow' ./lv_drivers/display/monitor.c:291: undefined reference toSDL_Quit’

What MCU/Processor/Board and compiler are you using?

Windows 7/Simulator

What do you want to achieve?

Basic running demo to begin working with

What have you tried so far?

Followed the tutorial for copying the SDL2 library, although the library I got from SDL was 2.0.10 not 2.0.05 if that makes a difference. I have verified MinGW is in the system path and the libraries within Eclipse show in the correct order (mingw32, SDL2main, SDL2). I’ve changed the builder to internal CDT builder as well.

I am not a C/C++ expert so assume I made all the mistakes somehow.

Code to reproduce

lv_sim_eclipse_sdl github repository

Do you insists on the Eclipse simulator?
Codeblocks and Visual studio project work out of the box on Windows:
See https://github.com/littlevgl/lvgl/#quick-start-in-a-simulator

1 Like

If it’s anything like the Visual Studio simulator project, you’ll probably need to clone the repository rather than downloading the compressed files and then pasting in the missing contents. Worth a try, perhaps.

Hello,How to set roller style in V7 ?

Please open a new topis for a new, unrelated question.

Neither visual studio or codeblocks works out of the box for me. I have not been able to get 7.0 running at all using any of the projects in any of the IDEs

I have SDL MinGW both installed and in my path. I tried using the Visual Studio 2019 (Not VS code) using the solution file as described in the docs. I cloned the repository not downloaded.

I get CRT and std lib errors (unresolved) and had a bunch of other errors before with it not finding included headers, possible conversion data loss errors, sign mismatch errors, At first the problem was that it didn´t like the windows sdk even though I did a new install I had to downgrade to one starting with 18… instead of 19… Then include paths and search directories were being ignored. The x64 compile throws over 2000 errors right now :slight_smile: while I have the x86 compile down to the 2 errors being mentioned in the visual-studio-2019-compile-errors thread.

I had to turn off code security checks because some stuff is depreciated
Set the Compile as C or else it wants C++ std latest
turn off warnings as errors

My command line for win32(could have some left over junk)
/permissive- /GS /analyze- /W0 /Zc:wchar_t /I"C:\Users\XXXXX\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl" /I"C:\Users\XXXXX\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl\SDL2\lib" /I"C:\Users\XXXXX\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl\SDL2\include" /I"C:\Users\XXXXX\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl\lvgl" /I"C:\Users\XXXXX\source\repos\lv_sim_visual_studio_sdl\visual_studio_2017_sdl\SDL2" /ZI /Gm- /Od /sdl- /Fd"Debug\vc142.pdb" /Zc:inline /fp:precise /D “_MBCS” /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MDd /std:c++17 /FC /Fa"Debug" /EHsc /nologo /Fo"Debug" /Fp"Debug\lv_sim_visual_studio_sdl.pch" /diagnostics:column

I have similar problems in codeblocks but that is most likely my fault and havent spent nearly as much time on that as I did trying to make it work in Visual Studio 2019, Visual Studio code, and QT. I am a newb but the Win SDK error and the depreciated code errors seems to point to a change in the latest VS19.

Maybe something has changed in VS2019, however, the CodeBlocks project has a dev-7.0 branch which should work out of the box (make sure to use the version of CodeBlocks that includes MinGW).

Thank you very much,I have soluted this quesition.

I will try that.

Maybe we just need a setup guide from start to finish as if it was a blank slate project so it doesnt matter what version of a IDE someone is using or what previous settings have been set. If we know all the settings that the project relies on it will be much easier to solve conflicts instead of hoping no default settings have changed or are being overwritten. MinGW also changed their folder structure in the last versions so include paths are all wrong if they are set in some config file. It is now C:\MinGW\bin etc. because there are only 32bit binaries.

That was the problem I had with the demos included with QT as well. They had changed some default compiler settings so their own examples stopped working between version 4 and 5 of QT creator.

I have even been having problems getting it to use the right compile settings because you can have a build task for the IDE, the project, the file and depending on what you have clicked last you might even be changing the wrong settings. In Visual Studio Code it is the most confusing where you can literally add include paths that are only used for the IntelliSense which then removes error messages but does nothing for your build settings but the file is called cpp_properties.json leading you to believe you are changing the right thing. Then you have 3 settings.json files for your build tasks but depending which build button you click it will execute different ones or 2 of them at the same time. I even have 1 build button that ignores all of them and I have no idea where it gets the configuration from.

I know I have been rambling but I am trying to demonstrate the weird issues and how frustrating the process can be for a beginner who doesn´t understand how this stuff works and is then faced with software that is designed by psychopaths. I have spent over 40 hours trying to get just the demo to compile (Which works out of the box :joy: ) and am no closer now than when I started. I wouldn´t even consider myself a total newb and I am running into so many issues I would hate to see what a student playing with a hobby kit is going through.

Just tried the code blocks project and noticed a few problems.

-I did a fresh install of codeblocks 20.3 with mingw which installed itself in the programs folder but is set to programs x86 in the git project compiler settings.

  • The project still has E://projects/lvgl as the additional search directories in the project file.
  • there is no SDL included in this projects linker settings only mingw32

I have made these changes so far and still get errors about undefined references to various things from the std libs. I will update as I make progress.

You don’t need SDL for the CodeBlocks driver; it uses a pure Win32 driver written by me that doesn’t depend on anything besides the built-in libraries from MinGW.

I found the problem I needed to add ‘mingw32’ and gdi32 to the linker.

This should probably be added to the setup instructions since it seems other people before me had the same problem.

The only other changes were to make sure that codeblocks set the right path for the install and removed remnants of other settings that had somehow included themselves. The debug build config still doesn´t work only the release so there must be some other stuff left behind.

Weird because I did a complete uninstall including the my documents folder with the old workspaces then did a reinstall after rebooting and I didn´t change any settings in the install directory.

Now that I know that I may give visual studio code another try later tonight.

Looks great though I am really excited to start working with this new version.