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

Christophe Ortiz christophe.ortiz at ciemat.es
Wed Apr 2 07:19:49 CDT 2014


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/0316c2c8/attachment.html>


More information about the petsc-users mailing list