▲ | CyberDildonics 3 days ago | |
I can't figure out why anyone would call it 'nonsense'. The definitions and functions have to be together, they may as well be a single file separated by a preprocessor definition. Include the header where you want the definitions. Include the header and use the preproccesor definition in the compilation unit you want the functions in. Done. There is no speed issue here. It would take 100x the C to make a difference and it's actually going to be much faster and simpler to put a lot of single file libraries into one compilation unit. I always wonder if the downsides are theoretical or if people are really doing what I've been doing and still have a problem with it. |