2021-11-05 12:35 AM
Hello again, I know i posted some time ago but my question is not seen anymore (link to original https://community.st.com/s/question/0D53W00000wWDX2SAO/cubemonitor-still-not-seeing-boolean-values)
I was suggested to to include "stdbool.h" but, as I'm working with a C++ project, G++ says that bool is supported and what I get in "stdbool.h" is the following (italic is greyed out code):
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
#else /* __cplusplus */
/* Supporting _Bool in C++ is a GCC extension. */
#define _Bool bool
#if __cplusplus < 201103L
/* Defining these macros in C++98 is a GCC extension. */
#define bool bool
#define false false
#define true true
#endif
#endif /* __cplusplus */
I could manually modify the file to use "C" bool but, is there another way?
Thank you!
Solved! Go to Solution.
2023-09-27 06:58 AM
No update since a while, closing the post.
2021-11-24 07:04 AM
Is someone there?
2021-11-29 07:22 AM
Helloooo?
2021-11-29 05:02 PM
So, is your source file C or C++? If C++ then just do not include stdbool.h, as you already have bool ?
2021-11-29 11:31 PM
Mainly c++ files.
As i wrote, if i include stdbool it won't use stdbool's bool, but c++ bool!
These lines are greyed out:
#ifndef __cplusplus
#define bool _Bool
#define true 1
#define false 0
And i think cubeMonitor wants that type of bool above, not what i have as active code in the file.
/* Supporting _Bool in C++ is a GCC extension. */
#define _Bool bool
2023-09-27 06:58 AM
No update since a while, closing the post.
2023-09-27 07:44 AM
Please stop churning up years old stale content and awarding yourself the best answer.
Just close the threads quitely/transparently so they don't bubble up as new content/posts.