I think my new Windows machine cannot find the "attribute" mechanism. Is this because __attribute__
is a GNU thing only? I am trying to compile some headers that I created on my Linux box using gcc. I am using Visual C++ 6.0 for the first time in my life. How can I fix this?
Code:
typedef struct s_mystruct {
unit somevar;
} __attribute__((packed)) MyStruct;
Error : error C2146: syntax error : missing ')' before identifier 'attribute' error C2061: "syntax error : identifier 'attribute' "
Same type of error at different place -->
**typedef unsigned long uint128_t __attribute__ ((mode(TI)));
typedef long int128_t __attribute__ ((mode(TI)));**
This time even code is not enabled :(
Well, we can of course implement -
#define __attribute__(x)
which will simply remove the remark from the code during pre-processing.
But this solution may change build behavior.
Please suggest a better solution.