On Wed, Apr 18, 2012 at 12:40 PM, Christian Staudt <span dir="ltr"><<a href="mailto:christian.staudt@ira.uka.de">christian.staudt@ira.uka.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello PETSc users,<br>
<br>
I am new to PETSc (and, coming from the Java world, not an experienced C++ developer). I hope my question is appropriate on this list.<br>
<br>
Here's my problem: I'd like to build an application in C++ against PETSc, using Eclipse CDT. However, I have problems including PETSc as a library in my Eclipse CDT project.<br>
<br>
<br>
I have tried the following for my test project:<br>
<br>
In Properties>>C/C++ Build>>Settings>>GCC C++ Compiler >> Includes I add the path<br>
<br>
/usr/local/petsc/include/<br>
<br>
In Properties>>C/C++ Build>>Settings>>MacOS X C++ Linker >> Libraries, I add<br>
<br>
/usr/local/petsc/arch-darwin-c-debug/lib/libpetsc.a<br>
<br>
to "Libraries (-l)" and<br>
<br>
/usr/local/petsc/arch-darwin-c-debug/lib/<br>
<br>
to "Library search path (-L)"<br>
<br>
<br>
<br>
Now I try to build a simple Hello World program which has the lines<br>
<br>
#include <petsc.h><br>
#include <petscmat.h><br>
<br>
at the beginning of the main file.<br>
<br>
I get compiler errors for almost every line of the PETSc header files, indicating that basic types are not found, for example:<br></blockquote><div><br></div><div>I guarantee you there is a "Header not found" error up at the top that you cut off. ALWAYS send the full error message.</div>
<div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
/usr/local/petsc/include/petscmat.h:1643: error: 'PetscScalar' has not been declared<br>
/usr/local/petsc/include/petscmat.h:1721: error: 'PetscReal' has not been declared<br>
/usr/local/petsc/include/petscmat.h:1152: error: 'PetscReal' does not name a type<br>
...<br>
<br>
<br>
Can anyone tell me what might be the problem? Thank you.<br>
<br>
Chris<br>
<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>