473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Command Line Parsing Library

Hi All,

I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.

Adam
Jul 23 '05 #1
7 3199
Adam Hartshorne wrote:
Hi All,

I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.

Adam


Boosts "Program Options" is the best i have found so far.

http://www.boost.org/doc/html/program_options.html
HTH

Fabio

Jul 23 '05 #2
Adam Hartshorne wrote:
I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.


getopt

Jul 23 '05 #3
Panjandrum wrote:
Adam Hartshorne wrote:
I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.

getopt

The first libray suggested seems a little over the top for what I require.

getopt is only included with unix/linux as far as I am aware. I need a
solution that allows me to do this seamlessly as part of a cross
platform application.

Any more suggestions?

Adam
Jul 23 '05 #4
Adam Hartshorne wrote:
Panjandrum wrote:
Adam Hartshorne wrote:
I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.

getopt

The first libray suggested seems a little over the top for what I require.

getopt is only included with unix/linux as far as I am aware. I need a
solution that allows me to do this seamlessly as part of a cross
platform application.

Any more suggestions?

Adam


The source for getopt is freely downloadable from the GNU/FSF web
site. So, you can use it on OS'es other than Unix/Linux if you
wish (e.g. on Windows).

Larry
Jul 23 '05 #5
Adam Hartshorne wrote:
Panjandrum wrote:
getopt
The first libray suggested seems a little over the top for what I require.

getopt is only included with unix/linux as far as I am aware.


Try a internet search with 'getopt Windows'.
I need a
solution that allows me to do this seamlessly as part of a cross
platform application.

Any more suggestions?


Maybe:
CLO++ http://pmade.org/site/show/Software
http://www.cmcrossroads.com/bradapp/...+/CmdLine.html
http://xparam.sourceforge.net/
http://www.yagol.org/
and something called getopt++

Jul 23 '05 #6
Adam Hartshorne wrote:
Hi All,

I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on both
windows and linux hopefully without requiring any particular platform
considerations.

Adam


I made a command line parser in C++ a while back that you might like.
You can find it at http://dclib.sourceforge.net
It is simpler than the boost stuff (I think anyway).
Jul 23 '05 #7
Adam Hartshorne wrote:
Hi All,

I am looking for a c++ class or library that will handle command line
parsing for me. Any such library is required to be able to work on
both windows and linux hopefully without requiring any particular
platform considerations.


See http://www.boost.org/doc/html/program_options.html

Jeff Flinn
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Manlio Perillo | last post by:
Regards. In the standard library there are two modules for command line parsing: optparse and getopt. In the Python Cookbook there is another simple method for parsing, using a docstring. ...
4
by: Boogie El Aceitoso | last post by:
Hi, I need a command line parser that understands filename swith spaces. Since I'm absolutelly sure I'm not the first developer to need a command line parser, I was wondering is there's a...
4
by: Greg B | last post by:
Well since getopt() doesn't seem to be compatible with Windows, and the free implementation of it for Windows that I found still had some annoying restrictions, I thought I'd whip up a simple...
6
by: John Paulsson | last post by:
Is there a C# pattern or perhaps a .NET framework way of parsing a command lines, supporting quoted filepaths etc? (I'm not talking about the current applications command arguments. I've got...
8
by: Andrew Robert | last post by:
Hi Everyone. I tried the following to get input into optionparser from either a file or command line. The code below detects the passed file argument and prints the file contents but the...
40
by: raphfrk | last post by:
I have a program which reads in 3 filenames from the command line prog filename1 filename2 filename3 However, it doesn't work when one of the filenames has spaces in it (due to a directory...
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
11
by: wangzq | last post by:
Hello, I'm passing command line parameters to my browser, I need to pass the complete command line as-is, for example: test.py "abc def" xyz If I use ' '.join(sys.argv), then the double...
2
by: =?Utf-8?B?UmFtb24gR2VuZQ==?= | last post by:
Hello: I am building a console application and I am having an issue with the command line arguments. A couple of my arguments are paths and they are usually enclosed in double quotes. If one of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.