Re: [Boost-bugs] [Boost C++ Libraries] #4908: Bug in program_options

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4908: Bug in program_options
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-20 17:44:25


#4908: Bug in program_options
-------------------------------+--------------------------------------------
  Reporter: dix75@… | Owner: vladimir_prus
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: program_options
   Version: Boost 1.45.0 | Severity: Problem
Resolution: invalid | Keywords:
-------------------------------+--------------------------------------------

Comment (by dmpas@…):

 The same problem!


 "-lboost_program_options" didn't help and I tried to link the lib
 immediately:[[BR]]

 {{{
 g++ mysource.cpp /.../libboost_program_options.a
 }}}

 and 've got success on this code:[[BR]]
 {{{
 ....
     desc.add_options()
         ("help", "help message")
         ("in", po::value<std::string> (), "Input file")
         ("out", po::value<std::string> (), "Output file")
         ("min-layer", po::value<std::string> (), "First layer index")
         ("max-layer", po::value<std::string> (), "Last layer index")
     ;
 ...
 }}}
 but if I add something like this:[[BR]]
 ("k", po::value<'''long'''> (), "K")[[BR]]
 or ("k", po::value<'''int'''> (), "K")[[BR]]
 or ("k", po::value<'''double'''> (), "K")

 and try to compile again, I get this:[[BR]]
 /tmp/cc3PlF2b.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[vtable
 for boost::program_options::invalid_option_value]+0x20): undefined
 reference to `boost::program_options::validation_error::what()
 const'[[BR]]

 I can't use anything except of std::string and even compile examples.

 System:
 {{{
 Ubuntu 12.04.2 LTS

 g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

 libboost-program-options 1.48.0-3
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4908#comment:5>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC