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

VS2022 v9.0.0 can't display img (lv_img_set_src(img, &picture); ) #77

Open
Bendikos opened this issue Jul 15, 2024 · 2 comments
Open

VS2022 v9.0.0 can't display img (lv_img_set_src(img, &picture); ) #77

Bendikos opened this issue Jul 15, 2024 · 2 comments

Comments

@Bendikos
Copy link

图片

But CodeBlocks lvgl9.1 can display images normally!

图片

@laishanhai1040
Copy link

I also encountered the same problem. The examples and demos were normal, but the code I wrote myself did not work.

@laishanhai1040
Copy link

我发现这是 C 和 C++ 语法不同的原因,经过测试,可以为 lvgl 生成的 img_test.c 添加一个 img_test.h 文件,并且添加上
'''#ifdef __cplusplus
extern "C" {
#endif

extern const lv_image_dsc_t img_test;

#ifdef __cplusplus
} /extern "C"/
#endif '''

在我的电脑上测试是可以正常显示的。

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

2 participants