Opened 14 years ago

Closed 13 years ago

Last modified 11 years ago

#2684 closed Bugs (fixed)

program_options.hpp does not compile

Reported by: bada_adami Owned by: Vladimir Prus
Milestone: Boost 1.38.0 Component: program_options
Version: Boost 1.48.0 Severity: Problem
Keywords: Cc: driscoll@…

Description

I am having compilation problem with program_options.hpp.

I believe fix is simple.

Current code:

#if _MSC_VER > 1200

Proposed code:

#if defined(_MSC_VER) && (_MSC_VER>1200)

How do I get this change incorporated into the boost source code?

Change History (7)

comment:1 by anonymous, 14 years ago

What compilation problem, on what compiler?

comment:2 by anonymous, 14 years ago

With gcc 4.1 or later with -Wundef flag on command line.

Error: _MSC_VER not defined

It should be 1020 in above example instead of 1200.

comment:3 by anonymous, 14 years ago

Something is not right here. I get the following:

../../../boost/program_options.hpp:11:5: warning: "_MSC_VER" is not defined

which is warning, not error. Further, this is not the only place where such warning is emitted, some other being Boost.Config.

Can you clarify?

comment:4 by anonymous, 14 years ago

In my case, we treat warnings as errors. -Werror -Wundef

comment:5 by anonymous, 14 years ago

are passed as flags to g++.

comment:6 by Vladimir Prus, 13 years ago

Resolution: fixed
Status: newclosed

This appears to be fixed in SVN, in [51639].

comment:7 by driscoll@…, 11 years ago

Cc: driscoll@… added
Version: Boost 1.37.0Boost 1.48.0

This problem is still present in release 1.48.0. Was the fix that vladimir_prus mentions (and looks like it's still on trunk/) fixed, or is it really the case that a fix that was made in March 2009 hasn't made it into the release yet?

Note: See TracTickets for help on using tickets.