+1
0
-1

Unable to redefine a macro with a preinclude file in VectorCast 6.4

Hello,

I have a #define REGISTER_VALUE (*(unsigned short *)0x3FF56) in one of the headers included in the source directories, say abc.h, and I want to redefine the macro in a preprocess...

Posting in: 

4 Answers:

+1
0
-1

Hello,

This is more often done in unit prefix user code, but I suppose it can be done with a preprocess preinclude file. Given abc.h is macro guarded, do the following.

#include "abc...

+1
0
-1

Hello Brian,

I tried this solution and it raises a compilation error saying that (following the example) AuxVar is undeclared.

Maybe it is better to do it as a unit prefix user code...

+1
0
-1

Environment > update environment > user code (optional) > Unit prefix user code

Add the same there. Then rebuild.

B R

Brian

+1
0
-1

Hello Brian,

This solution works. Thank you.

Guillermo