Thank you for replying.
As I explained, I deleted my main method and I inserted first.cpp
(boost program_option example) in my project. It compiles f but when I
pass an options to the command line (ex. --help) the assertion fails.
Note that the program has no problem if no parameter is passed to the
command line.
Back trace from the program shows that the line of boost code that
trigger the assertion is line 63 of options_description.cpp:
- if (*m_long_name.rbegin() == '*')
The trace is the following:
msvcp90d.dll!std::_Debug_message(const wchar_t * message=0x017f7918,
const wchar_t * file=0x017f7778, unsigned int line=112) Line 24 C++
SchedulerModel.exe!std::_String_const_iterator ::operator*() Line 112 + 0x14 bytes C++
SchedulerModel.exe!std::_Revranit & other_tokens=[0]()) Line 294 + 0x28 bytes C++
SchedulerModel.exe!boost::program_options::detail::cmdline::run()
Line 238 C++
SchedulerModel.exe!boost::program_options::basic_command_line_parser<char>::run()
Line 102 + 0xf bytes C++
SchedulerModel.exe!boost::program_options::parse_command_line<char>(int
argc=2, char * * argv=0x00174e88, const
boost::program_options::options_description & desc={...}, int style=0,
boost::function1 Since I am using cplex library, can it be that this problem is
triggered by a particular method/function in such a library ?
(date_time works perfectly)
Thank you again
Alessandro
On Fri, Feb 6, 2009 at 10:43 PM, Alex MDC I am newbie and I am developing in C++ using VC9, Boost 1.37, CPLEX
11.1. I use date_time and program_options boost libraries and my program
compiles fine. Date_time works perfectly while program_options gives me a
runtime error saying "Debug assertion failed .... string iterator not
dereferencable" every time I pass any argument in the command line. The
assertion fails at line 112 of "C:\program files\microsoft visual studio
9.0\vc\include\xstring" When you get the assertion failure, have a look at the back trace to find
out which line in program_options and which line of your code it is coming
from, maybe that will give more clues. If you're still stuck it is helpful if you can post a *small* but complete
code snippet that can reproduce your problem, as there may be something very
simple that you're doing wrong. Alex _______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users