[petsc-users] compiling PETSc using c++ compiler
Sam Guo
sam.guo at cd-adapco.com
Tue Oct 6 16:59:39 CDT 2020
Dear PETSc dev team,
When I compile PETSc using
--with-cc=gcc --with-cxx=g++ --with-clanguage=cxx,
I got following error:
../../../petsc/src/sys/objects/pinit.c: In function ‘PetscInitialize’:
../../../petsc/src/sys/objects/pinit.c:913:21: error: expected declaration
specifiers or ‘...’ before numeric constant
913 | PetscComplex ic(0.0,1.0);
| ^~~
../../../petsc/src/sys/objects/pinit.c:913:25: error: expected declaration
specifiers or ‘...’ before numeric constant
913 | PetscComplex ic(0.0,1.0);
| ^~~
../../../petsc/src/sys/objects/pinit.c:914:15: error: ‘ic’ undeclared
(first use in this function)
914 | PETSC_i = ic;
| ^~
../../../petsc/src/sys/objects/pinit.c:914:15: note: each undeclared
identifier is reported only once for each function it appears in
Thanks,
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201006/c43acf5a/attachment.html>
More information about the petsc-users
mailing list