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

Make the example program buildable. #26

Merged
merged 3 commits into from
Aug 17, 2021

Conversation

cmumford
Copy link
Contributor

Modify the example program, demo_jpg_sjpg, so that it can compile
and link. Doing this will make it easier to detect required changes
when LVGL is changed, as well as function as a simple test program
for this project.

Modify the example program, demo_jpg_sjpg, so that it will compile
and link. Doing this will make it easier to detect required changes
when LVGL is changed, as well as function as a simple test program
for this project.
Copy link
Member

@embeddedt embeddedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this should probably be wrapped in an #if LV_LIB_SJPG_TEST guard, to prevent this main from being linked into real applications?

@cmumford
Copy link
Contributor Author

cmumford commented Aug 12, 2021

The upcoming CMakeLists.txt will create a library for this project, so desktop apps won't even be including this file, and I'm pretty sure that a ESP-IDF build won't include this either. Maybe you're thinking of lv_demos, which have no main(), and are included elsewhere?

I'm happy to add the #ifdef, but wanted to understand how you envisioned it being used?

@cmumford
Copy link
Contributor Author

Just noticed I confused lv_demos and lv_examples, but still am curious how this would be used.

@cmumford cmumford mentioned this pull request Aug 14, 2021
@kisvegabor
Copy link
Member

Perhaps this should probably be wrapped in an #if LV_LIB_SJPG_TEST guard, to prevent this main from being linked into real applications?

E.g. I use Eclipse that automatically collects all the C files. Therefore there would be 2 main() functions.
You can exclude certain folders from build, but we should make the project work out of box without any extra configuration.

@cmumford
Copy link
Contributor Author

cmumford commented Aug 14, 2021 via email

@kisvegabor
Copy link
Member

Looks good, merging.

@kisvegabor kisvegabor merged commit 58d18aa into lvgl:master Aug 17, 2021
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

Successfully merging this pull request may close these issues.

3 participants