Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

<unistd.h> not giving me getopt in C

Name: Anonymous 2011-03-04 6:28

So I am writing a program using C which implements options. Naturally I'd need to #include <unistd.h>. However after including this header file, I still get the error:

undefined symbol: opterr
warning: implicit function declaration: getopt


etc. wat do /prog/?

Name: Anonymous 2011-03-04 6:30

idk, #include <getopt.h>?

Name: Anonymous 2011-03-04 6:44

Thanks for the sage, but now it just opened up a ton more errors. It did help though, so thank you. /prog/ shouldn't do my homework but I need help.

Name: Anonymous 2011-03-04 6:50

man 3 getopt

Name: Anonymous 2011-03-04 7:25

Thanks for the sage
If you'd have lurked /prog/ a bit before selfishly posting yet another boring HALP thread; you would have realized saging is considered polite here.

Name: Anonymous 2011-03-04 8:06

etc. wat do /prog/?
Back to /b/ please.

Name: Anonymous 2011-03-04 8:17

>>6
no u

Name: VIPPER 2011-03-04 9:09

>>7
Yes you.

Name: Anonymous 2011-03-04 9:42

>>8
Hax my anus.

Name: Anonymous 2011-03-04 14:35

extern int getopt(int argc, char * const argv[], const char *optstring);

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List