AnsweredAssumed Answered

How to fix macro redefined errors

Question asked by Josh Jordan on Mar 20, 2014
Latest reply on Mar 27, 2014 by rickli

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.