This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newbie questions about gcc / glibc


"Frederich, Eric P21322" <eric.frederich@siemens.com> writes:

> I have a bunch of command line programs and I am trying to support
> Windows, Linux and an older version of Solaris.
> I got the same version of gcc working on all 3 platforms.
> 
> Now the problem is that I can't get getopt_long to work which is
> provided by getopt.h.
> I don't know much about how all of these things glue together or whether
> it is the compiler, c library, or the operating system which is supposed
> to provide some of these functions.
> 
> I saw getopt.h, getopt.c, and getopt1.c in my gcc directory under
> libiberty.
> What are these for?  Is getopt supposed to be part of gcc or part of
> glibc?

This is the wrong mailing list.  This mailing list is for people
develping gcc itself.  For questions about using gcc, please use
gcc-help@gcc.gnu.org.  Please send any followup questions to gcc-help
or to some other appropriate mailing list.  Thanks.


getopt is part of the C library.  gcc does not provide a C library.
gcc includes copies of getopt_long for internal use.  That code is
used by gcc itself, not by programs which use gcc.

You can find copies of getopt_long for your program in the gnulib
package on savannah.gnu.org.  Please note the licensing requirements
shown there.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]