On Thu, Jun 9, 2016 at 10:31 AM, 张江 <zhangjiang.d...@gmail.com> wrote:

> Hi,
>
> I got a problem when I tried to compile a program with libmesh. The errors
> are listed as below:
>
> In file included from /Users/xxx/opt/libmesh/include/libmesh/dof_map.h:24:
> In file included from
> /Users/xxx/opt/libmesh/include/libmesh/libmesh_common.h:59:
> */Users/xxx/opt/libmesh/include/libmesh/libmesh_exceptions.h:125:11: **error:
> **exception specification of overriding function is more lax than base
> version*
>   virtual ~SolverException() libmesh_noexcept {};
> *          ^*
> */Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:95:13:
> note: *overridden virtual function is here
>     virtual ~exception() _NOEXCEPT;
> *            ^*
> In file included from /Users/xxx/code/anl-dlb/tests/exiomesh.cpp:3:
> In file included from /Users/xxx/opt/libmesh/include/libmesh/dof_map.h:24:
> In file included from
> /Users/xxx/opt/libmesh/include/libmesh/libmesh_common.h:59:
> */Users/xxx/opt/libmesh/include/libmesh/libmesh_exceptions.h:125:29: **error:
> **expected ';' at end of declaration list*
>   virtual ~SolverException() libmesh_noexcept {};
> *                            ^*
>                             ;
> */Users/xxx/opt/libmesh/include/libmesh/libmesh_exceptions.h:130:24: **error:
> **exception specification of overriding function is more lax than base
> version*
>   virtual const char * what() const libmesh_noexcept
> *                       ^*
> */Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/exception:96:25:
> note: *overridden virtual function is here
>     virtual const char* what() const _NOEXCEPT;
> *                        ^*
>
> Is this error caused by the version of the compiler or anything else?
>


Hmm... can you look in build/include/libmesh_config.h, and see
whether LIBMESH_HAVE_CXX11_NOEXCEPT is defined?

It appears you are using the Clang compiler that comes with Xcode.  What
version of OSX and Xcode are you using?

A possible temporary fix is to change the string "libmesh_noexcept" to
"throw()".  The latter is the C++03 exception specification.  Using
"noexcept" worked for the various compilers I use, but I did not double
check Xcode Clang...

-- 
John
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to