And BTW: --with-clanguage=cxx is not needed for using PETSc from c++. It primarily exists for debugging purposes [or some corner cases where C build of PETSc does not work from c++ code]
Satish On Tue, 6 Oct 2020, Satish Balay via petsc-users wrote: > Can you send the complete logs for this build [configure.log, make.log]? > > Satish > > On Tue, 6 Oct 2020, Sam Guo wrote: > > > 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 > > >
