Go Back  IT Forums > Software > Software Wanted
User Name
Password
Reply
 
Thread Tools Search this Thread Display Modes

getopt and getopt_long for Windows? [with VC++]
  #1
Old 03-03-2006, 07:59 AM
Angel Tsankov
Junior Member


Angel Tsankov is offline
Angel Tsankov's Info
Join Date: Mar 2006
Posts: 2
Default getopt and getopt_long for Windows? [with VC++]

Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++?
Reply With Quote
getopt and getopt_long for Windows? [with VC++]
  #2
Old 03-04-2006, 06:04 AM
Sandeep
Junior Member


Sandeep is offline
Sandeep's Info
Join Date: Mar 2006
Posts: 2
Default getopt and getopt_long for Windows? [with VC++]


Angel Tsankov wrote:
Quote:
Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++?


Are you looking for something like "CommandLineInfo". You can extend
from this class for your commandline parsing needs.

Reply With Quote
getopt and getopt_long for Windows? [with VC++]
  #3
Old 03-04-2006, 07:42 AM
Angel Tsankov
Junior Member


Angel Tsankov is offline
Angel Tsankov's Info
Join Date: Mar 2006
Posts: 2
Default getopt and getopt_long for Windows? [with VC++]

>> Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++?
Quote:
Are you looking for something like "CommandLineInfo". You can extend from this class for your commandline parsing needs.


No, I'm looking for a port of getopt and getopt_long for Windows. I'd like my programs that use any of these two functions to
compile with VC++ w/o any modification or conditionals.

Reply With Quote
getopt and getopt_long for Windows? [with VC++]
  #4
Old 03-04-2006, 08:10 AM
Guest
Guest


Guest's Info
Posts: n/a
Default getopt and getopt_long for Windows? [with VC++]

Angel Tsankov wrote:
Quote:
Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++? Are you looking for something like "CommandLineInfo". You can extend from this class for your commandline parsing needs. No, I'm looking for a port of getopt and getopt_long for Windows. I'd like my programs that use any of these two functions to compile with VC++ w/o any modification or conditionals.


Good question. If you are GNU compatible, then I would encourage you
to look at YICS (http://www.yics.org). The source includes a getopt()
for Windows, that works well enought for most purposes. If you find a
better solution please let us know by posting it here.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/

Reply With Quote
getopt and getopt_long for Windows? [with VC++]
  #5
Old 03-04-2006, 08:44 AM
Sandeep
Junior Member


Sandeep is offline
Sandeep's Info
Join Date: Mar 2006
Posts: 2
Default getopt and getopt_long for Windows? [with VC++]

Angel Tsankov wrote:
Quote:
Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++? Are you looking for something like "CommandLineInfo". You can extend from this class for your commandline parsing needs. No, I'm looking for a port of getopt and getopt_long for Windows. I'd like my programs that use any of these two functions to compile with VC++ w/o any modification or conditionals.


You can look at boost which provides portable libraries for c++

specifically :
http://www.boost.org/doc/html/progr...s/overview.html

Reply With Quote
getopt and getopt_long for Windows? [with VC++]
  #6
Old 03-04-2006, 09:40 AM
Randy Howard
Junior Member


Randy Howard is offline
Randy Howard's Info
Join Date: Feb 2005
Posts: 8
Default getopt and getopt_long for Windows? [with VC++]

Angel Tsankov wrote
(in article <4409b548$0$15795$14726298@news.sunsite.dk>):
Quote:
Does anyone know of a port of getopt and getopt_long for Windows, especially one that compiles and links with VC++? Are you looking for something like "CommandLineInfo". You can extend from this class for your commandline parsing needs. No, I'm looking for a port of getopt and getopt_long for Windows. I'd like my
programs that use any of these two functions to compile with VC++ w/o any modification or conditionals.


Yes, I've gone down that path a few times myself. For some
reason, it's difficult to find GNU software that will compile
cleanly off of POSIX. :-)

I finally took the simpler route and use a getopt implementation
that compiles anywhere you have a standard C compiler. I have
no use for getopt_long, the last thing I want to do is write
even more complicated command line interfaces. I've yet to see
the need for getopt_long. YMMV.


--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw





Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Style Design by vBStyles.com


Top Contact Us - IT Forums - Archive - MyLounge Top
MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service