<div><div dir="auto">Thanks, Satish! It works now.</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 22, 2019 at 12:05 AM Balay, Satish <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Try compiling a PETSc example with the corresponding PETSc makefile -<br>
to check the compile/link command that you need to use.<br>
<br>
Its best to use a PETSc formatted makefile for user code [check users<br>
manual for an example]<br>
<br>
Satish<br>
<br>
On Mon, 21 Oct 2019, Jianhua Qin via petsc-users wrote:<br>
<br>
> Hello everyone,<br>
> <br>
> I am new to petsc and trying to play with petsc. However, I met the problem<br>
> of linking petsc to my code. For example, I have a simple code named<br>
> hello.c which include petscvec,h, but I don't know how to include. I always<br>
> get the following error :<br>
> <br>
> <br>
> *hello.c:1:10: fatal error: petscvec.h: No such file or directory #include<br>
> <petscvec.h>*<br>
> <br>
> I compile with the following command:<br>
> <br>
> * gcc -L/home/lucky/Desktop/software/petsc-3.7.7/arch-linux2-c-debug/lib<br>
> hello.c -o hello: *<br>
> <br>
> It would be best if any of you can give any suggestions.<br>
> <br>
> Best,<br>
> Jianhua<br>
> <br>
<br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Jianhua</div></div>