23 Jul
2008
23 Jul
'08
1:22 p.m.
Hi all.
I just wanted to remind win32 developers that when they use the C lib string functions in <string.h>, they should take care to #include <string.h>, even if their code will compile without it. Apparently mingw's runtime .h files are configured a little differently, and other includes (stdio? stdlib?) pick up the string.h definitions. Without that #include, your code that uses string functions might compile, but when you commit, it will break the build for everyone else. I know, because I have been guilty of this more than once myself! :)
IMHO, even if one feels confident that their includes are handled by other includes, in situations like this it is best to be explicit, safe, and portable.
bob