I #include but when I call strcasestr(src, search); I get the following error message implicit declaration of function ‘strcases
As specified in the corresponding manpage, since strcasestr is a nonstandard extension you must #define _GNU_SOURCE before the before any #include #include (other files may already include , thanks @Cubbi for pointing out this potential problem); this can also easily be accomplished by specifying -D_GNU_SOURCE on the compiler command line.