main.cpp has a header in it and that header has a couple macros. When I try to build it does not reconize my macros. I can not move the macros to main.cpp, so that is not an option. For the life of my I can not find a way to do this build. Any ideas? Thank you in advance.
I think you have to wrap the macro in a function to activate it, otherwise it is ignored.
That's not accurate. Macros are a text substitution facility built into the preprocessor. The expansion of the macro will be inserted where ever the preprocessor finds the macro. A macro does not have to be part of a function. It can be used in another macro. It can be used to define a global value. For example:
Thanks guys, calling it a day for now, will look in to this more tomorrow, and yes, there are probably some other mistakes with that line that I am making, I am getting a handle on gcc still, little by little though I will get there.
Of course AbstractionAnon, the macro can stand alone in a .h file.
My mistake.
#include "area.h" just puts the .h code straight into the user code, thus the macro into the user code.
I am thinking of static or dynamic libraries.