Boost logo

Boost Users :

Subject: Re: [Boost-users] [program_options] simple test case fails
From: Christian Henning (chhenning_at_[hidden])
Date: 2009-09-13 17:11:26


Hi again. Sorry Steven for not replying to your last email. This time,
I have tried something different and it worked! I basically rebuild
program_options with _SECURE_SCL and _HAS_ITERATOR_DEBUGGING enabled.
Can you double check whether or not you have these two symbols
enabled?

My program options are a simple "--input=ddd".

I have tried the test program ( see below ) on a different machine and
it blows up too.

Regards,
Christian

#include <iostream>
#include <boost/program_options.hpp>

using namespace std;
namespace po = boost::program_options;

int main(int argc, char* argv[])
{
   string input;

   po::options_description desc("Allowed options");
   desc.add_options()
       ( "help,h" , "produce help message" )
       ( "input" , po::value<string>( &input ), "Input File" );

   po::variables_map vm;
   po::store( po::parse_command_line(argc, argv, desc), vm );
   po::notify( vm );

   if( vm.count( "help" ))
   {
       cout << desc << endl;
       return 1;
   }
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net