views:

70

answers:

3

I have a portable code running on Visual C++ 2008 and RHEL 5.3 (gcc 4.x.x).

My program should accept command line arguments. I consider using some library for that task. My candidats are:

  1. Boost program options
  2. ACE has this capability too

(1) is not in standard and as for (2) we already using it heavily for other tasks. Which is prefered one? Maybe there're other libraries out there?

+3  A: 

I like a lot boost::PO, but I never used ACE, so I can't compare.

You're saying that boost is not a standard, but is it really a problem? Many people consider it as almost a standard. At least it isn't any exotic library.

Tristram Gräbener
+2  A: 

Personally, I'd just use getopt.h on *nix and include something like http://doxygen.postgresql.org/getopt%5F8c-source.html in the build on windows.

nos
A: 

Writing your own can be an option as well. It's not that hard of a problem to solve.

But if you're already using one of the libraries then that is the most obvious choice.

Dan Olson