Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > getopt under windows

Reply
Thread Tools

getopt under windows

 
 
Markus Mayer
Guest
Posts: n/a
 
      11-07-2007
Am 07.11.2007 16:15 postulierte Nemanja Trifunovic folgendes:
> On Nov 7, 8:01 am, Markus Mayer <(E-Mail Removed)>
> wrote:
>> Hi.
>>
>> Any chances that there is a similar thing to *nix's getopt() under
>> windows? (It doesn't actually have to be too nifty, the requirement is
>> just that it is stable.)
>>

>
> Take a look at XGetopt: http://www.codeproject.com/cpp/xgetopt.asp
>
> Or even better, if you are using C++, there is Boost.Program_options
> library which is portable: http://www.boost.org/doc/html/program_options.html
>


Damn, I always forget about Boost. I'll have a look at that, too.
Thanks!

Markus
 
Reply With Quote
 
 
 
 
user923005
Guest
Posts: n/a
 
      11-07-2007
On Nov 7, 5:01 am, Markus Mayer <(E-Mail Removed)>
wrote:
> Hi.
>
> Any chances that there is a similar thing to *nix's getopt() under
> windows? (It doesn't actually have to be too nifty, the requirement is
> just that it is stable.)


There are getopt() variants available as source code all over the net.

My favorite is my_getopt:
http://www.geocities.com/bsittler/

Next time, when you are looking for source code, do a web search.

Asking news:comp.lang.c to do it for you is annoyingly lazy.

 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      11-07-2007

"Markus Mayer" <(E-Mail Removed)> wrote in message
> Hi.
>
> Any chances that there is a similar thing to *nix's getopt() under
> windows? (It doesn't actually have to be too nifty, the requirement is
> just that it is stable.)
>

Ypu seem to have found what you are looking for.
There's an options parser on my website that does error-checking for you.
However it works in rather a different way to getopt(). I'd like to think
better.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm



 
Reply With Quote
 
Nemanja Trifunovic
Guest
Posts: n/a
 
      11-08-2007
On Nov 7, 8:01 am, Markus Mayer <(E-Mail Removed)>
wrote:
> Hi.
>
> Any chances that there is a similar thing to *nix's getopt() under
> windows? (It doesn't actually have to be too nifty, the requirement is
> just that it is stable.)
>



See XGetOpt: http://www.codeproject.com/cpp/xgetopt.asp

 
Reply With Quote
 
Markus Mayer
Guest
Posts: n/a
 
      11-09-2007
Am 08.11.2007 20:44 postulierte Nemanja Trifunovic folgendes:
> On Nov 7, 8:01 am, Markus Mayer <(E-Mail Removed)>
> wrote:
>> Hi.
>>
>> Any chances that there is a similar thing to *nix's getopt() under
>> windows? (It doesn't actually have to be too nifty, the requirement is
>> just that it is stable.)
>>

>
>
> See XGetOpt: http://www.codeproject.com/cpp/xgetopt.asp
>


Yeah, I found that before but I forgot to mention that the solution I
search(ed) for has to be ANSI C compatible.

Thanks anyway!
Markus
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A router running under WinXP runs under Windows Vista too? Peter Wagner Wireless Networking 12 02-04-2008 11:02 PM
getopt and getopt_long for Windows? Angel Tsankov C++ 1 03-03-2006 02:02 PM
Having problems parsing command line options using Getopt::Long on windows mothra Perl Misc 3 12-02-2004 05:41 PM
Java application developped under Linux running ridiculously slow under Windows hshdude Java 12 11-04-2004 05:49 PM
Problem with Getopt Arvind Kumar Perl 1 11-03-2003 06:50 PM



Advertisments