Boost C++ Libraries: Ticket #2684: program_options.hpp does not compile https://svn.boost.org/trac10/ticket/2684 <p> I am having compilation problem with program_options.hpp. </p> <blockquote> <p> I believe fix is simple. </p> </blockquote> <blockquote> <p> Current code: </p> </blockquote> <blockquote> <p> #if _MSC_VER &gt; 1200 </p> </blockquote> <blockquote> <p> Proposed code: </p> </blockquote> <blockquote> <p> #if defined(_MSC_VER) &amp;&amp; (_MSC_VER&gt;1200) </p> </blockquote> <blockquote> <p> How do I get this change incorporated into the boost source code? </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2684 Trac 1.4.3 anonymous Tue, 27 Jan 2009 05:49:23 GMT <link>https://svn.boost.org/trac10/ticket/2684#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2684#comment:1</guid> <description> <p> What compilation problem, on what compiler? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 27 Jan 2009 20:49:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2684#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2684#comment:2</guid> <description> <p> With gcc 4.1 or later with -Wundef flag on command line. </p> <p> Error: _MSC_VER not defined </p> <p> It should be 1020 in above example instead of 1200. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 27 Jan 2009 20:57:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2684#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2684#comment:3</guid> <description> <p> Something is not right here. I get the following: </p> <pre class="wiki">../../../boost/program_options.hpp:11:5: warning: "_MSC_VER" is not defined </pre><p> which is warning, not error. Further, this is not the only place where such warning is emitted, some other being Boost.Config. </p> <p> Can you clarify? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 27 Jan 2009 23:38:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2684#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2684#comment:4</guid> <description> <p> In my case, we treat warnings as errors. -Werror -Wundef </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 27 Jan 2009 23:38:41 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2684#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2684#comment:5</guid> <description> <p> are passed as flags to g++. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sat, 30 May 2009 09:48:40 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2684#comment:6 https://svn.boost.org/trac10/ticket/2684#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This appears to be fixed in SVN, in <a class="changeset" href="https://svn.boost.org/trac10/changeset/51639" title="Make sure _MSC_VER is defined before checking its value. ">[51639]</a>. </p> Ticket driscoll@… Tue, 10 Jan 2012 22:17:38 GMT version changed; cc set https://svn.boost.org/trac10/ticket/2684#comment:7 https://svn.boost.org/trac10/ticket/2684#comment:7 <ul> <li><strong>cc</strong> <span class="trac-author">driscoll@…</span> added </li> <li><strong>version</strong> <span class="trac-field-old">Boost 1.37.0</span> → <span class="trac-field-new">Boost 1.48.0</span> </li> </ul> <p> 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? </p> Ticket