[petsc-users] How to include PETSc in an Eclipse CDT project

Jed Brown jedbrown at mcs.anl.gov
Wed Apr 18 11:45:39 CDT 2012


On Wed, Apr 18, 2012 at 09:40, Christian Staudt <christian.staudt at ira.uka.de
> wrote:

> In Properties>>C/C++ Build>>Settings>>GCC C++ Compiler >> Includes I add
> the path
>
> /usr/local/petsc/include/
>
> In Properties>>C/C++ Build>>Settings>>MacOS X C++ Linker >> Libraries, I
> add
>
> /usr/local/petsc/arch-darwin-c-debug/lib/libpetsc.a
>
> to "Libraries (-l)" and
>
> /usr/local/petsc/arch-darwin-c-debug/lib/
>
> to "Library search path (-L)"
>
>
>
> Now I try to build a simple Hello World program which has the lines
>
> #include <petsc.h>
> #include <petscmat.h>
>
> at the beginning of the main file.
>
> I get compiler errors for almost every line of the PETSc header files,
> indicating that basic types are not found, for example:
>
> /usr/local/petsc/include/petscmat.h:1643: error: 'PetscScalar' has not
> been declared
> /usr/local/petsc/include/petscmat.h:1721: error: 'PetscReal' has not been
> declared
> /usr/local/petsc/include/petscmat.h:1152: error: 'PetscReal' does not name
> a type
>

What was the _first_ error message? Was petscconf.h found?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120418/46dd3c11/attachment.htm>


More information about the petsc-users mailing list