2020-12-07 01:40 AM
In my code when I am using touchgfx::Unicode::UnicodeChar it is showing expected an expression....What files should I include to solve this error
Solved! Go to Solution.
2020-12-07 05:07 AM
#include <touchgfx/Unicode.hpp>
2020-12-07 05:07 AM
#include <touchgfx/Unicode.hpp>
2020-12-07 08:39 PM
As soon as I include this file. I am getting many errors . I have to use "touchgfx ::Unicode::UnicodeChar" outside the touchgfx folder in order to display a char arrray....Can you please guide what should I do next?
Error[Pe020]: identifier "namespace" is undefined C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 79
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 80
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 153
Error[Pe020]: identifier "class" is undefined C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 162
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 163
Error[Pe040]: expected an identifier C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 216
Error[Pe099]: a declaration here must declare a parameter C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 216
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 229
Error[Pe130]: expected a "{" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 374
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 375
Error[Pe077]: this declaration has no storage class or type specifier C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 458
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 458
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 713
Error[Pe018]: expected a ")" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 736
Error[Pe168]: a function type is not allowed here C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 736
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 737
Error[Pe077]: this declaration has no storage class or type specifier C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 877
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 877
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\hal\Types.hpp 1012
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __vfp size_t strlen(char const *)" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 68
(declared at line 54 of "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\arm\inc\c\string.h")
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __vfp char *strncpy(char *restrict, C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 88
char const *restrict, size_t)" (declared at line 60 of "C:\Program Files (x86)\IAR Systems\Embedded
Workbench 8.3\arm\inc\c\string.h")
Error[Pe147]: declaration is incompatible with "__interwork __vfp uint16_t strncpy(uint16_t *, uint16_t const *, C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 108
uint16_t)" (declared at line 88)
Error[Pe147]: declaration is incompatible with "__interwork __softfp uint16_t *snprintf(uint16_t *, uint16_t, C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 252
uint16_t const *, ...)" (declared at line 178)
Error[Pe147]: declaration is incompatible with "__interwork __vfp uint16_t *vsnprintf(uint16_t *, uint16_t, C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 270
uint16_t const *, va_list)" (declared at line 196)
Error[Pe147]: declaration is incompatible with "__interwork __vfp uint16_t *snprintfFloats(uint16_t *, uint16_t, C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 433
uint16_t const *, float const *)" (declared at line 320)
Error[Pe247]: function "snprintfFloat" has already been defined (at line 370) C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 495
Error[Pe167]: argument of type "char const *" is incompatible with parameter of type "uint16_t const *" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 497
Error[Pe147]: declaration is incompatible with "__nounwind __interwork __vfp int strncmp(char const *, char C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 521
const *, size_t)" (declared at line 58 of "C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.3\
arm\inc\c\string.h")
Error[Pe077]: this declaration has no storage class or type specifier C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 577
Error[Pe065]: expected a ";" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 577
Error[Pe018]: expected a ")" C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 580
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 583
Error[Pe169]: expected a declaration C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 584
Error[Pe114]: function "snprintfFloats" was referenced but not defined C:\Users\SESA566532\Desktop\rishi\disp_arm\Middlewares\ST\touchgfx\framework\include\touchgfx\Unicode.hpp 320
Error while running C/C++ Compiler
2020-12-08 11:47 PM
UnicodeChar is just typedeffed as uint16_t. I think you're including the file in some c-code. Keep TouchGFX code in cpp. What're you trying to do? I'm positive there's another way around it.
2020-12-10 05:58 AM
Yes Sir you are right. I am trying to print a unsigned char array (String) in touchgfx from an another C file. But In display it is reflecting as ????.So I went through your forums it was recommended to use strcpy to solve the issue.....That's why ? The hierarchy is I am sending the unsigned char array to wchar_t * and then I am printing it in screen (under touchgfx Files)
2020-12-10 06:37 AM
? means the characters are not generated by touchgfx. You need to put in any wildcard characters you want generated (so you dont have all glyphs from all your fonts creating a huge application).
2020-12-10 07:05 AM
I have included in wildcard Characters. But still the problem exists
2020-12-10 01:36 PM
Check your generated files in generated/fonts source files - Are the unicodes there?
Did you make sure to invalidate the textarea after updating its wildcard buffer?
2020-12-10 09:36 PM
Problem Solved I understand. How it works....Thanks a ton sir!
2020-12-10 11:17 PM
Great! Let me know if you think there's something to improve in the documentation for better understanding. thanks.