Boost logo

Boost Users :

Subject: Re: [Boost-users] [program_options] VM object unable to store the values of options
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-02-06 01:36:54


Wenjing Jia wrote:

> 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"):

...

> I also tried on the other examples mentioned on that web page, such as
> "example/options_description.cpp". When I type:
> "options_description --optimization 4 -I foo a.cpp",
> the output is:
> "Include paths are:
> Input files are:
> Optimization level is -858993460".
> That is the input values are not taken and stored by the vm object.
>
> Why such a simple example won't work on my machine!?

I imagine that the only reason for such behaviour could be some mismatch in compilation
options between the library and the program. Does the problem persist if you try
a later release? Do you have RTTI enabled in your project? Do you have any options
affecting ABI set to values different from default (e.g. alignment)

Also, are you sure you don't have *two* boost installations, of different version,
and use headers from one installation and libraries from another?

- Volodya


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