c - How can I compile code that uses getsubopt()? -
i want parse list of options of form key1=val1, key2=val2, etc
(like options mount -o
). getsubopt()
function seems perfect task (http://www.gnu.org/s/hello/manual/libc/suboptions.html). however, when try compile code using gcc, get:
warning: implicit declaration of function ‘getsubopt’
and program segfaults when run it.
do have:
#define _xopen_source 500 #include <stdlib.h>
at top of file contains call subopt
? error getting expect if call function has not been declared.
Comments
Post a Comment