[petsc-users] Troubles installing PETSc

Jed Brown jedbrown at mcs.anl.gov
Thu Nov 21 06:48:48 CST 2013


"Justin Dong (Me)" <jsd1 at rice.edu> writes:

> Here is the error message:
>
>> $ make ex2
>> cc     ex2.c   -o ex2
>> ex2.c:13:10: fatal error: 'petscsys.h' file not found
>> #include <petscsys.h>
>>          ^
>> 1 error generated.
>> make: *** [ex2] Error 1

Looks like this make command is not being run from the same directory as
the makefile, or perhaps "makefile" is misspelled?  Can you build
examples in-place within the source tree?

  $ cd src/sys/examples/tutorials
  $ make ex2

Then go back to the directory containing your files (ex2.c and makefile)
and try

  $ make -f makefile ex2

You can trim it down to the minimal makefile like Matt suggested, though
this should not change anything.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131121/f4c10e98/attachment.pgp>


More information about the petsc-users mailing list