4 ms·
Tarballs don't really solve the problem as nicely as a single header file.
by IshKebab 11y ago
Tarballs don't really solve the problem as nicely as a single header file.
- mcguire 11y ago"Nicely"? It needs to abuse the preprocessor to avoid having multiple conflicting copies of the functions. The implementation mode requires to define the preprocessor macro NK_IMPLEMENTATION in *one* .c/.cpp file before #includeing this file, e.g.: #define NK_IMPLEMENTATION #include "nuklear.h"
- deleted 11y ago[deleted]
- SolarNet 11y agoThat's literally what the preprocessor is for. The C++ inline keyword basically has the same effect, and probably half (or more) of your headers "abuse" it for exactly this purpose.