boost-program-options Questions
3
Solved
I'd like to implement subcommands to my program. I also need the ability to have different argument options for different subcommands. What's the best way to do this using Boost.Program_options?
S...
Berm asked 21/3, 2013 at 7:12
3
Solved
I have a boost::program_options::variables_map args. Now I want to insert into this map manually like a key-value pair.
Example:
boost::program_options::variables_map args
args["document"] = "A"...
Discriminator asked 9/5, 2019 at 9:24
3
clang-format seems to make a big mess out of blocks like this:
desc.add_options()("help", "output usage")
("inputDirectory", po::value<boost::filesystem::path>()->required(), "The input ...
Lonne asked 22/12, 2016 at 17:53
2
Solved
I am currently trying to rework some code that was handed down to me. The original point of the code is to read a configuration file, and to set up the different options in the file in a boost::pro...
Cataract asked 7/9, 2020 at 15:26
3
Solved
In the boost tutorials online for program options : http://www.boost.org/doc/libs/1_39_0/doc/html/program_options/tutorial.html#id2891824
It says that the complete code examples can be found at "B...
Sotelo asked 10/8, 2009 at 22:41
5
Solved
//Using boost program options to read command line and config file data
#include <boost/program_options.hpp>
using namespace std;
using namespace boost;
namespace po = boost::program_opti...
Nopar asked 20/3, 2013 at 21:34
2
Solved
I want to implement a command-line like interface inside my program. So I receive strings that follow the normal command-line syntax (e.g. "-G foo -dp bar --help"). As I don't want to implement the...
Mcclung asked 22/8, 2013 at 11:11
3
That's the question. Why would I use implicit_value over default_value and vice versa?
Thanks!
Thrombosis asked 13/5, 2010 at 19:47
4
Solved
po::options_description desc("This are the options that are available");
desc.add_options()("help", "print help")(
"deer", po::value<uint32_t>(), "set how many deer you want")(
"rating", p...
Supine asked 8/1, 2014 at 23:36
0
We are currently investigating a possible undefined behaviour in our program that is flagged by clang7 UBSan in combination with boost::program_option from boost 1.69.0. We have created the followi...
Derwood asked 8/3, 2019 at 13:35
3
Solved
When you use Boost library program_options it is very easy to print help for your program:
boost::program_options::variables_map options;
boost::program_options::options_description optionsDesc;
b...
Lemons asked 2/1, 2013 at 17:30
3
I am using Boost program_options to parse a config file in the standard way as
shown in the multiple_sources.cpp example file of program_options.
ifstream ini_file("config.ini");
po::store(po:...
Erma asked 26/2, 2013 at 15:17
1
Solved
When I type a.out -i file0 file1 at the command line, I want the option -i to receive both file0 and file1 But, -i only receive file0 but not file1
But, I found that I had to type a.out -i file0 -...
Sauncho asked 24/2, 2017 at 0:22
2
I want to parse multiple command line arguments using boost::program_options. However, some arguments are strings enclosed in double quotes. This is what I have -
void processCommands(int argc, ch...
Motorboating asked 3/11, 2010 at 22:58
2
Solved
Some boost libraries are header-only, some are not, and for various reasons etc.
Is there a specific reason/design decision why Boost.ProgramOptions is not header-only?
I'm wondering becaus...
Praline asked 15/3, 2017 at 13:49
3
With program options, I am checking valid combinations of arguments. But for some reason, gpu argument is a bool and it is always true regardless if I set it to false on the command line. Is there ...
Beale asked 21/8, 2015 at 22:36
2
I'm using boost::program_options to get parameters from a config file.
i understand that i can create a file by hand and program options will parse it. but i'm looking for a way for the program to...
Dote asked 16/1, 2011 at 0:55
1
Is there any way of making program options dependent on other options using boost::program_options?
For example, my program can accept the following sample arguments:
wifi --scan --interface=en0
...
Streetwalker asked 10/7, 2016 at 6:2
3
Solved
I am on Ubuntu 14.04, using CMake and CLion. I am trying to use Program Options, with the following code taken from an example in their documentation:
#include <iostream>
#include <boost/...
Constance asked 13/2, 2016 at 17:20
2
Solved
I have the following boost::program_options program.
boost::program_options::options_description opts("Allowed options");
opts.add_options()
("help", "produce help message"),
("mingw", boost::pr...
Clover asked 7/7, 2013 at 18:55
1
Solved
I have a boost::program_options option that successfully parses the desired input options into a vector, but I'm not seeing how to also give it a default value. Example:
base.add_options()
("vect...
Workbag asked 23/11, 2016 at 1:59
6
Solved
When using boost::program_options, how do I set the name of an argument for boost::program_options::value<>()?
#include <iostream>
#include <boost/program_options.hpp>
int main(...
Atalaya asked 8/8, 2009 at 19:6
1
I would like to make a positional, list program option with boost_program_options that do not allow named program options (like --files).
I have the following snippet of code:
#include <boost/...
Scholz asked 8/10, 2016 at 12:1
2
Solved
I've been trying to validate my passed options with boost::program_options. My command has several modes, each of which have associated params that can be specified. What I'm trying to do is ensure...
Iggy asked 8/2, 2012 at 20:6
3
Solved
I can not seem to be able to read from config file multitoken options like I can from command line. What is the syntax for the config file?
This is how the option description is added:
//parser.c...
Stanzel asked 4/5, 2011 at 13:50
1 Next >
© 2022 - 2024 — McMap. All rights reserved.