How to override a plugin's header file?

How can I make my project use my own version of a “standard” include file?

To be specific, I want my own version of eTypes.h (from the CGPS plugin):

  • Just placing my eTypes.h in my project’s inc folder dooesn’t work - the standard one is still used;
  • Re-ording the include paths in the project settings dooesn’t work - the standard one is still used.

For now, I have deleted the plugin’s include path completely from my project settings - but is there another way :question:


But wm_types.h defines u32 and s32 as int - not long.

It does so happen that int and long are the same size on GCC, but this can lead to some warnings: particularly with sprintf (and similar) - which will warn that “%d” should not be used with long

It seems that there is no “elegant” way to do this…
I would have suggested to reorder the include paths in the project properties (just have a look to the build console in order to verify the order is correctly replicated on the compiler invocation command line), but if you have already tried without success, it means that the include paths order doesn’t matter…
Personally, in such cases I’d use the ugly way (if I’m sure there is no impact in the interface): keep a safe copy of the original file, and either modify it in place, or simply remove it from the “official” place to force the compiler to use mine.