help-gengetopt
[Top][All Lists]
Advanced

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

Re: [help-gengetopt] Include getopt code


From: Lorenzo Bettini
Subject: Re: [help-gengetopt] Include getopt code
Date: Thu, 12 Apr 2007 17:33:30 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070329)

Lorenzo Bettini wrote:
> T Menezes wrote:
>> Hi,
>>
>> This morning I tried to use gengetopt (2.19.1) on a project running in
>> Windows. For the first time, I added '--include-getopt' on the command
>> line because I wanted to make the project as self-contained as possible
>> (some of the people involved with this piece of code do not know and are
>> not inclined to learn Linux-based code/libraries).
>>
>> When I then used the cmdline.h & cmdline.c files in my project, an error
>> message popped up saying the compiler (sadly using MS Visual Studio on
>> this particular occasion) cannot find getopt.h.
>>
>> I was under the impression that the '--include-getopt' option would sort
>> out all getopt-related issues (particularly useful in systems where the
>> getopt library isn't available).
>>
>> Could anyone please clarify how I should be using the version of getopt
>> generated by gengetop?
> 
> Hi there!
> 
> it's my fault: in the generated .c file, in case of --include-getopt,
> the initial #include "getopt.h" should not be there...
> 
> I'll try to fix this soon
> 
> in the meanwhile, could you please try to remove that line from the
> generated .c file?  This should make your problem go away

sorry, that's not enough: I had to modify some other parts of the
generated parser.

Here you find a hopefully fixed version of gengetopt that correctly
generates parser when --include-getopt is specified

http://rap.dsi.unifi.it/~bettini/gengetopt-2.19.2.tar.gz

hope to hear from you soon!

thanks again
        Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DSI, Univ. di Firenze
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]