How to fix macro redefined errors

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to fix macro redefined errors

2,269 Views
robotjosh
Contributor IV

There is a macro PSP_MAXIMUM_INTERRUPT_VECTORS defined in cortex.h.  When I compile there are 6 identical errors generated, the macro is redefined 6 times.  In cortex.h it starts with #ifndef __cortex_h__ followed by #define __cortex_h__ so it should be impossible for this error to happen.  Even if this header is included 6 times, that #ifndef should cause the entire file to be skipped if it was already included.  How do I make this compile right?  This error is the same for codewarrior 10.5 and 10.3.

 

I saw this thread CodeWarrior 10 Macro Redefined Compile Error and created a prefix file containing "#pragma once on" but the compile errors come out exactly the same.

 

There are 2 other errors "the file 'fnet_cpu.h' cannot be opened" and "the file 'fnet.h' cannot be opened" which are puzzling because those files exist with read permissions right next to other files that the compiler was able to open.

 

I also tried to clean and refresh the project with no effects.

Labels (1)
0 Kudos
1 Reply

1,604 Views
Rick_Li
NXP Employee
NXP Employee

hi Jordan,

as you mentioned in your reply in SR, the he macro error was because the motor control .a file wasn't being included correctly.

if you need further assistance, then, please contact us again!

0 Kudos