<div dir="ltr">Hi Satish,<div>   I am using our internal makefile to make PETSc. When I use PETSc makefile, it works. Hence it must be our compiling flags responsible for the error. I'll look into it.</div><div>   I want to experiment c++ compiler to see if I can compile real and complex versions to different symbols (I've created another thread for this topic.) but it seems c++ compiler does not help and I still get same symbols.</div><div><br></div><div>Thanks,</div><div>Sam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 6, 2020 at 3:35 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">And BTW: --with-clanguage=cxx is not needed for using PETSc from<br>
c++. It primarily exists for debugging purposes [or some corner cases<br>
where C build of PETSc does not work from c++ code]<br>
<br>
Satish<br>
<br>
On Tue, 6 Oct 2020, Satish Balay via petsc-users wrote:<br>
<br>
> Can you send the complete logs for this build [configure.log, make.log]?<br>
> <br>
> Satish<br>
> <br>
> On Tue, 6 Oct 2020, Sam Guo wrote:<br>
> <br>
> > Dear PETSc dev team,<br>
> >   When I compile PETSc using<br>
> > --with-cc=gcc --with-cxx=g++ --with-clanguage=cxx,<br>
> > I got following error:<br>
> > ../../../petsc/src/sys/objects/pinit.c: In function ‘PetscInitialize’:<br>
> > ../../../petsc/src/sys/objects/pinit.c:913:21: error: expected declaration<br>
> > specifiers or ‘...’ before numeric constant<br>
> >   913 |     PetscComplex ic(0.0,1.0);<br>
> >       |                     ^~~<br>
> > ../../../petsc/src/sys/objects/pinit.c:913:25: error: expected declaration<br>
> > specifiers or ‘...’ before numeric constant<br>
> >   913 |     PetscComplex ic(0.0,1.0);<br>
> >       |                         ^~~<br>
> > ../../../petsc/src/sys/objects/pinit.c:914:15: error: ‘ic’ undeclared<br>
> > (first use in this function)<br>
> >   914 |     PETSC_i = ic;<br>
> >       |               ^~<br>
> > ../../../petsc/src/sys/objects/pinit.c:914:15: note: each undeclared<br>
> > identifier is reported only once for each function it appears in<br>
> > <br>
> >  Thanks,<br>
> > Sam<br>
> > <br>
> <br>
</blockquote></div>