Senior
March 6, 2023
Question
Using C library with TouchGFX
- March 6, 2023
- 4 replies
- 2459 views
I am trying to implement dynamic QRCode generation. I am using the library https://github.com/ricmoo/QRCode and the QRCode widget from https://support.touchgfx.com/4.16/docs/development/ui-development/touchgfx-engine-features/custom-widgets#example-source-code.
The qrcode generation library is in C and uses variable length arrays. TouchGFX, which uses C++ compiler, does not like this and throughs error.
How do I inform TouchGFX tool to treat the library as C files? The C library does have extern C used as below. But it still doesn't help.
#ifdef __cplusplus
extern "C"{
#endif /* __cplusplus */
For your reference, I am attaching the TouchGFX project here.
