getopt under windows

  • Thread starter Friedrich Dominicus
  • Start date
M

Markus Mayer

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.)

Regards,
Markus
 
K

Kenny McCormack

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.)

The obvious thing is: Google is your friend.

/OT - I used getopts() in Windows all the time - under Cygwin - /OT

(I don't know if there is a "native" API for it - Google [or MSDN] will
tell you)
 
J

jacob navia

Markus said:
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.)

Regards,
Markus

The lcc-win32 compiler has getopt() as part of its standard
library. If interested I can mail you the source.
 
M

Markus Mayer

Am 07.11.2007 14:12 postulierte Kenny McCormack folgendes:
The obvious thing is: Google is your friend.

No it's not. Google hates me.

Regards,
Markus
 
M

Markus Mayer

Am 07.11.2007 14:19 postulierte jacob navia folgendes:
The lcc-win32 compiler has getopt() as part of its standard
library. If interested I can mail you the source.

That would be nice. For my mail address, strip everything before the "@"
sign from the address and replace it with "sunside".

Thanks in advance!
Markus
 
M

Markus Mayer

Am 07.11.2007 14:47 postulierte Markus Mayer folgendes:
Am 07.11.2007 14:19 postulierte jacob navia folgendes:

NetBSD/OpenBSD getopt(); getopt.h signature:
/* $OpenBSD: getopt.h,v 1.1 2002/12/03 20:24:29 millert Exp $ */
/* $NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $ */

I had to fine tune some things to make it work with VC++, but it now
works like a charm.

Thanks alot!
Markus
 
B

Ben Pfaff

Markus Mayer said:
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.)

getopt is pretty simple. Why not just implement it yourself?
 
U

user923005

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 to do it for you is annoyingly lazy.
 
M

Malcolm McLean

Markus Mayer said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top