[prev in list] [next in list] [prev in thread] [next in thread]
List: linuxppc-dev
Subject: getopt (__USE_POSIX2?)
From: hollis+ () andrew ! cmu ! edu (Hollis R Blanchard)
Date: 1999-01-29 5:02:52
Message-ID: Pine.LNX.3.96L.990128235558.6379F-100000 () unix48 ! andrew ! cmu ! edu
[Download RAW message or body]
Hi. I went to compile Mixer.app (a dockable app for WindowMaker) just now, and
I got the error that getopt was implicitly declared, and optarg was an
undeclared variable.
With a little digging, 'man 3 getopt' found that both the function and the
variable live in unistd.h, which was not included in the (single) source file.
So, happy to have found the problem, I included <unistd.h>, and promptly got
the same error.
I opened up /usr/include/unistd.h, and found the "missing" declarations fine,
but noticed that they were declared inside an '#ifdef __USE_POSIX2' block.
Now:
What do I do about this? Apparently __USE_POSIX2 isn't defined, so those
things aren't getting declared. Can/should I #define __USE_POSIX2 in Mixer.h
(there are two files, .h and .cc)? That seems very hackish. The Makefile was
generated with xmkmf (and thus imake) - should I be passing some arguments to
xmkmf that will define it?
This is with:
egcs-1.0-2e
egcs-as-gcc-1.0-2e
egcs-c++-1.0-2e
egcs-objc-1.0-2e
-Hollis
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request at lists.linuxppc.org ]]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic