Noob ImportC questions
Steven Schveighoffer
schveiguy at gmail.com
Fri Feb 28 09:53:58 UTC 2025
On Thursday, 27 February 2025 at 08:16:33 UTC, John C. wrote:
> On Thursday, 27 February 2025 at 08:10:04 UTC, John C. wrote:
>> would removing some "hard to parse" constructs in header file
>> help this situation?
>
> I tried to change
> ```
> #define LIGHTGRAY CLITERAL(Color){ 200, 200, 200, 255 }
> // Light Gray
> ```
> To more simpler definition which does not contain other
> previously defined macros (such as CLITERAL above)
> ```
> #define LIGHTGRAY (Color){ 200, 200, 200, 255 }
> // Light Gray
> ```
> But this change was not helpful, same error occured. Does this
> mean that ImportC cannot parse object literals?
#define constants translated to enums are very limited in
importC. Numbers and strings work. These color defines do not
work. In raylib-d the color defines are all translated by hand.
https://dlang.org/spec/importc.html#defines
-Steve
More information about the Digitalmars-d-learn
mailing list