How do I send programming policy of the main program to any library?

0

I have a library that generates a result of two allowed. This is done by defining, within the library itself, the #define __SE8R01__ or #define __RF24L01P__ directive.

The case is that this choice should be made within the main program. However I am not getting an alternative to this, being obliged to "move" in the original state of the library.

The question is how to send some main program directive, main() , to any library in use. Or an alternative, so that the library being compiled will recognize the appropriate policy?

    
asked by anonymous 04.09.2017 / 18:15

1 answer

1

Compiler directives indicate to the compiler how it should behave in different situations, so the only way to change its value is when compiling the library used, if it does not have the sources or can not compile it then nothing can be made to change the behavior of the library in question.

    
04.09.2017 / 18:20