Opened 14 years ago
Closed 13 years ago
#2096 closed Bugs (fixed)
program_options fails to compile with -fno-exceptions
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | Boost 1.36.0 | Component: | program_options |
Version: | Boost 1.35.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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.
Attachments (1)
Change History (5)
by , 14 years ago
Attachment: | boost_program_options_no_exceptions.diff added |
---|
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Yeah, that's a really good question. To be honest, I don't plan on using program_options in my application.
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.
comment:3 by , 14 years ago
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.
comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.