[petsc-users] Problem with including petscdmda.h

Xiang Hao haoxiang at yahoo.cn
Thu Nov 10 23:11:01 CST 2011


Hi,

I have a question about petscdmda.h.

I have a program using PETSc, which is running well. Now I just add a new
line #include <petscdmda.h> in my code and get the following error. I don't
understand what's going on here. Any help?

-------------------------------------------------------------------------------------------------------------
In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:4:0,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:
/home/sci/hao/software/PETSc/include/petscdm.h:27:8: error: ‘PetscClassId’
does not name a type
/home/sci/hao/software/PETSc/include/petscdm.h:48:8: error: ‘PetscBool’
does not name a type
/home/sci/hao/software/PETSc/include/petscdm.h:120:55: error: ‘PetscBool’
has not been declared
/home/sci/hao/software/PETSc/include/petscdm.h:144:46: error: ‘PetscBool’
has not been declared
/home/sci/hao/software/PETSc/include/petscdm.h:145:42: error: ‘PetscBool’
has not been declared
/home/sci/hao/software/PETSc/include/petscdm.h:146:42: error: ‘PetscBool’
has not been declared
In file included from /home/sci/hao/software/PETSc/include/petscdm.h:157:0,
                 from /home/sci/hao/software/PETSc/include/petscdmda.h:4,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:
/home/sci/hao/software/PETSc/include/petscbag.h:44:60: error: ‘PetscBool’
has not been declared
In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:5:0,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:
/home/sci/hao/software/PETSc/include/petscpf.h:41:8: error: ‘PetscClassId’
does not name a type
In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:5:0,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,
                 from
/home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:
/home/sci/hao/software/PETSc/include/petscpf.h:52:8: error: ‘PetscBool’
does not name a type
-------------------------------------------------------------------------------------------------------------------


The head file of my program begin with the following. The read line is the
one I just added.

#include <fstream>
#include <iostream>
#include <itkImage.h>
#include <itkImageFileReader.h>
#include <itkImageFileWriter.h>
#include <itkVectorImage.h>
#include <itkRecursiveGaussianImageFilter.h>
#include <petscksp.h>
#include <petscdmda.h>
#include <itkMedianImageFilter.h>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111110/a9209e2e/attachment.htm>


More information about the petsc-users mailing list