25-08-2022, 02:09 AM
I too have issue with the rules regarding the preprocessor directives in my line of work. Much of what I do is interfacing higher level algorithmic C++ code with POSIX API system functions, and my wrapper classes are about 90% non-compliant. Frequently running into violations surrounding the concept of "system frameworks" and reusable libraries. If I generate a shared utility library .so then I can pretty much guarantee that not ever class/method in it will be used in the target application.
The OP example is extremely relevant when designing platform portable code for multiple embedded environments.
The OP example is extremely relevant when designing platform portable code for multiple embedded environments.