[petsc-users] Problem with compilation C++ file. -std=c++0x option missing

Christophe Ortiz christophe.ortiz at ciemat.es
Wed Apr 2 07:27:17 CDT 2014


Obviously in
CFLAGS          = -std=c++0x

Sorry ! I need holidays :-).

Christophe

CIEMAT
Laboratorio Nacional de Fusión por Confinamiento Magnético
Unidad de Materiales
Edificio 2 - Planta 0 - Despacho 28m
Avenida Complutense 40,
28040 Madrid, Spain
Tel: +34 91496 2582
Fax: +34 91346 6442

--
Q
Por favor, piense en el medio ambiente antes de imprimir este mensaje.
Please consider the environment before printing this email.


On Wed, Apr 2, 2014 at 2:19 PM, Christophe Ortiz <christophe.ortiz at ciemat.es
> wrote:

> Hi all,
>
> Since I'm solving problems with many dof (thousands) I developed a
> programming interface in C++ to manage and automatize the coupling between
> the different fields and to distribute the different terms in the matrix.
> Now I am adding the different PETSc commands but the compiler complains
> with the typical error when using C++:
>
> This file requires compiler and library support for the upcoming ISO C++
> standard, C++0x. This support is currently experimental, and must be
> enabled with the -std=c++0x or -std=gnu++0x compiler options.
>
> In the case of C++ files (without PETSc) this is solved by simply adding
> the option -std=c++0x in the compilation line. I tried to add the
> -std=c++0x option in the makefile as follows but it does not work:
>
> diffusion: diffusion.o chkopts
>         -${CLINKER} -std=gnu++0x -o diffusion diffusion.o ${PETSC_TS_LIB}
>         ${RM} diffusion.o
>
>
> Where can I add this option in the makefile used to compile PETSc code ?
>
> Many thanks in advance.
> Christophe
>
> --
> Q
> Por favor, piense en el medio ambiente antes de imprimir este mensaje.
> Please consider the environment before printing this email.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140402/f7f20d02/attachment.html>


More information about the petsc-users mailing list