Re:SDL2 common mistakes and how to avoid them
by jcelerier on Sunday January 08, 2023 @09:30AM
(#34299376)
Yes for the sake of everything holy, the only time it's remotely acceptable to include with "" is for a header file corresponding to a source file. Otherwise always always include with <> and with the complete library prefix if possible, e.g. <SDL2/foo.h>, <libavcodec/codec.h>, etc etc and add as few include paths as you can, anything else is calling for subtle bugs if you're unlucky in how your third-party deps name their things
[ Parent
| on HN ]
Re:SDL2 common mistakes and how to avoid them
by deadbeeves on Sunday January 08, 2023 @10:06AM
(#34299679)
There's something much worse than including a library header with "", which is a library including its own headers (in the same directory) with <>! That means the user has no choice but to modify the include path.