pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Optarg and Optind undeclared when trying to build chrpath



On Sat, 5 May 2012 18:12:57 +0100
Stephen Nelson-Smith <sanelson%gmail.com@localhost> wrote:

> main.c:85: warning: implicit declaration of function `getopt'

Always fix the first error first.  :-)

I understand you included unistd.h, and that should have worked.  But
somehow it didn't.  You need to figure out why not.  

When you include the functional prototype for getopt(3), you'll likely
also have the external declarations for its associated variables.  

HTH. 

--jkl



Home | Main Index | Thread Index | Old Index