(Apologies if this message has come out for more than once, as I had
problem with authorization and is unsure when the message is able to be
seen by boost users!)
Hi,
I'm met a very weird thing when using the “Boost.Program_options”
library. Somehow, the variable-map(VM) object is unable to store values
of options which are fed in from the command line. I've been stuck in
this stupid problem for two days and cannot find any clue about it. Can
someone please give me a hint?
I'm using the Visual Studio 2005 on Windows XP SP3 to compile some
examples provided in Boost.Program_options Tutorial. The boost library
was installed using the boost_1_34_1 installer. However, no matter what
value I input to any option, the variable-map object "vm" I defined is
unable to store it and output it correctly.
For instance, I followed the instructions in the Tutorial of the
Boost.Program_options and compiled the first simplest possible example
"example/first.cpp". I then went to "start" of Windows XP and Run "cmd",
then run: "first --compression 10". The output is always "Compression
level was set to -858993460." regardless of what value I type after the
"--compression". Below is the full codes of the program (copied from the
"example/first.cpp"):
-------------------------------------------------------------------------------
#include