views:

853

answers:

2
+3  Q: 

getopt() in VC++

I'm quite fond of using GNU getopt, when programming under Linux. I understand, that getopt(), is not available under MS VC++.

Note:

  • Win32 environment
  • using Visual Studio
  • No Boost
  • No MFC
  • Not concerned with portability

Question:

  • How can I then port getopt() accordingly?
    • What guidelines should I be aware of while porting?
  • Known port with same features?
+3  A: 

This may help, it's also very easy to integrate

http://www.codeproject.com/KB/cpp/xgetopt.aspx

Andrew Grant
A: 

You will have to check out the license requirements, but the source to the GCC libraries is freely available. Just grab getopt() from there.

Harold Bamford