[petsc-users] Compile petsc with a simple code
Jianhua Qin
njustqin at gmail.com
Mon Oct 21 22:27:30 CDT 2019
Hello everyone,
I am new to petsc and trying to play with petsc. However, I met the problem
of linking petsc to my code. For example, I have a simple code named
hello.c which include petscvec,h, but I don't know how to include. I always
get the following error :
*hello.c:1:10: fatal error: petscvec.h: No such file or directory #include
<petscvec.h>*
I compile with the following command:
* gcc -L/home/lucky/Desktop/software/petsc-3.7.7/arch-linux2-c-debug/lib
hello.c -o hello: *
It would be best if any of you can give any suggestions.
Best,
Jianhua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20191021/f88001ec/attachment.html>
More information about the petsc-users
mailing list