boost-program-options Questions

1

Solved

Before you say OVERKILL, I don't care. How can I make Boost.program_options handle the required cat option -? I have // visible po::options_description options("Options"); options.add_options()(...
Timetable asked 1/4, 2013 at 19:33

2

The following library files exist: cls /usr/local/Cellar/boost/1.51.0/lib $ ls libboost_program* libboost_program_options-mt.a libboost_program_options-mt.dylib I include the following header wi...
Rancor asked 18/1, 2013 at 10:46

1

Solved

Given the following simple use of Boost.Program_Options: boost::program_options::options_description options("Options"); options.add_options() ("my_bool_flag,b", boost::program_options::value&l...

1

Solved

I have a program that reads a large number of variables from a configuration file using boost::program_options. The configuration file is working and reading the values, however since there are man...
Frenchify asked 19/3, 2013 at 13:47

1

Solved

I'm using the boost::program_options to specify the arguments to my C++ application. Is there a way to specify that one argument is required from a set of alternatives? <application> [--one ...
Archimedes asked 19/3, 2013 at 14:5

1

Solved

How do I serialize/deserialize a boost::program_options::variables_map? I can't find an already implemented serialize function, and I don't know what functions in variables_map I can use to extract...
Blent asked 6/11, 2010 at 5:52

2

I am using boost::program_options to handle command line parameters to a program. In the program below I would like group algo, exchanges and admin_port together such that they should all be provid...
Tiloine asked 21/8, 2012 at 21:39

1

I have the following toy program that gives errors with the MacPorts gcc on OSX 10.6 #include <boost/program_options.hpp> namespace po = boost::program_options; #include <iostream> us...
Whitecollar asked 16/1, 2013 at 21:7

1

Solved

Currently I am using boost::program_options to parse a configuration file on the BeagleBoard (ARM-based processor). My program is multi-threaded and linked against the boost 1.45 multithreaded libr...
Possie asked 14/8, 2012 at 13:53

1

Solved

I am using boost program_options 1.50.0 I want to ALLOW the following for my program foobar foobar --debug 2 --debug 3 From the boost program_options code, there is an example regex.cpp that show...
Gratuitous asked 6/10, 2012 at 0:49

2

Solved

I have two related questions: What is the simplest way to allow passing a series of values, using Boost Program Options? My aim is to avoid prog --opt 1 --opt 2 --opt 3 and have prog --opt 1 2 3 ...
Inexplicable asked 17/11, 2011 at 23:13

1

In the example (regex.cpp), the author of the library created a custom struct (magic_number) and a validate function for this struct to show how custom struct can be integrated into program options...
Shalandashale asked 21/11, 2012 at 13:20

1

Solved

I'm trying to get boost::program_options to read a ini file with multiple sections: [slave] address=localhost port=1111 [slave] address=192.168.0.1 port=2222 Is there any solution? Thanks in a...
Vesture asked 18/9, 2012 at 10:40

1

Solved

I do want to give a default value for the positional parameter as in the comment in the code, but the compiler complains. The code as it is compiles fine. I use boost 1.46.1 and g++ int main(int a...
Unquote asked 10/8, 2012 at 10:11

1

Solved

I'm using boost::program_options to implement a command-line utility with this syntax: myutil command [--in file_name] [---out file_name] where 'command' is mandatory, and is one of the followin...
Inextirpable asked 30/7, 2012 at 6:55

2

When I construct a boost::options_description instance like options.add_options() ("double_val", value(&config.my_double)->default_value(0.2), "it's a double"); and later want to have th...
Tandi asked 14/11, 2009 at 17:22

1

Solved

Good day, i wrote a class to parse a configuration file via boost::program_options. Here is what I have (shortened): namespace nsProOp = boost::program_options; nsProOp::variables_map m_variableM...
Sociometry asked 12/7, 2012 at 12:10

1

Solved

According to documentation I can parse config files in style : [main section] string = hello world. [foo] message = Hi ! But I need to parse list of plugins : [plugins] somePlugin. Hel...
Hippel asked 16/6, 2012 at 18:19

2

Solved

I am writing a program that uses Boost's Program Options library and I noticed the following syntax that has haunted me since I saw it: desc.add_options() ("help","produce help message") ( /* ot...
Nadinenadir asked 7/5, 2012 at 17:43

1

Solved

I want to use default values for some of my command line arguments. How do I tell program_options what the default option is, and, if the user doesn't supply the argument, how do I tell my program ...
Maun asked 17/4, 2012 at 16:12

1

Solved

I use boost::program_options to provide command line parsing interface to my application. I would like to configure it to parse the options, using namespace boost::program_options; options_descri...
Labyrinthodont asked 16/4, 2012 at 17:9

1

Solved

My code below did not work: wstring config_file; // Declare a group of options that will be // allowed only on command line po::options_description generic("Generic options"); generic.add_options...
Grimsley asked 3/8, 2011 at 3:3

1

Solved

Is there an easy way to separate the help-option from the 'real' program options? In fact, is it possible to define a hierarchy of options, a la BNF: options := help_options | program_options help...
Yabber asked 15/11, 2011 at 14:54

3

Solved

I use boost.program_options library. Consider this simplified case. po::options_description desc("Usage"); desc.add_options() ("uninstall,u", "uninstall program") ("custom,c", po::wvalue<std::w...
Meadows asked 25/10, 2011 at 10:57

1

Solved

I'm using boost::program_options to read the users' input from the command line argument. It works very nicely and allows me to output helpful usage messages and validate input properly. However, b...
Oconnor asked 29/8, 2011 at 17:7

© 2022 - 2024 — McMap. All rights reserved.