Boost C++ Libraries: Ticket #2096: program_options fails to compile with -fno-exceptions https://svn.boost.org/trac10/ticket/2096 <p> The program_options component fails to compile with GCC when -fno-exceptions is specified. The attached patch allows the libraries / tests shipped with boost 1.35.0 to compile. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2096 Trac 1.4.3 anonymous Thu, 10 Jul 2008 04:14:49 GMT attachment set https://svn.boost.org/trac10/ticket/2096 https://svn.boost.org/trac10/ticket/2096 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_program_options_no_exceptions.diff</span> </li> </ul> Ticket Vladimir Prus Thu, 10 Jul 2008 07:39:52 GMT <link>https://svn.boost.org/trac10/ticket/2096#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2096#comment:1</guid> <description> <p> With BOOST_NO_EXCEPTION, you're supposed to provide your own definition of throw_exception. Can you tell what that definition will do? Whereas aborting if an error happens during option parsing seems possible, I'm not sure what you might do on an error during getting an option. </p> </description> <category>Ticket</category> </item> <item> <author>brbarret@…</author> <pubDate>Thu, 10 Jul 2008 13:42:28 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2096#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2096#comment:2</guid> <description> <p> Yeah, that's a really good question. To be honest, I don't plan on using program_options in my application. </p> <p> It is used somewhere in the default build of boost 1.35.0 (I have a hard time telling what exactly is being compiled when using bjam and didn't keep good notes on the subject, so I'm not sure whether it was in one of the libraries or the test cases. I'd assume the test cases, given what program_options does). The patch was mainly doing enough so that make all install would succeed when -fno-exceptions is used. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Thu, 10 Jul 2008 14:10:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/2096#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2096#comment:3</guid> <description> <p> Hmm, if you don't have first-hand experience that program_options is remotely useful with -fno-exceptions, then I suggest you just add "--without-program_options" to bjam, and skip the build. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Vladimir Prus</dc:creator> <pubDate>Sun, 07 Jun 2009 16:10:04 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2096#comment:4 https://svn.boost.org/trac10/ticket/2096#comment:4 <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> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53723" title="Make program_options compile with disabled exceptions. It appears the ...">[53723]</a>) Make program_options compile with disabled exceptions. </p> <p> It appears the all throw statements are during the parsing, so alternative error reporting strategies are possible. Closes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2096" title="#2096: Bugs: program_options fails to compile with -fno-exceptions (closed: fixed)">#2096</a>. </p> Ticket