[petsc-users] How to include PETSc in an Eclipse CDT project
Jed Brown
jedbrown at mcs.anl.gov
Wed Apr 18 12:49:00 CDT 2012
On Wed, Apr 18, 2012 at 10:46, Christian Staudt <christian.staudt at ira.uka.de
> wrote:
> to the includes for my Eclipse project, which fixes the error that
> petscconf.h was not found.
>
> Now the following error appears:
>
> Building target: PETScTest2
> Invoking: MacOS X C++ Linker
> g++ -L/usr/local/petsc/arch-darwin-c-debug/lib/ -o "PETScTest2"
> ./src/PETScTest2.o -l/usr/local/petsc/arch-darwin-c-debug/lib/libpetsc.a
> ld: library not found for
> -l/usr/local/petsc/arch-darwin-c-debug/lib/libpetsc.a
> collect2: ld returned 1 exit status
> make: *** [PETScTest2] Error 1
>
> libpetsc.a definitely exists at this location. Is my PETSc installation
> broken?
>
This is not the right option with which to link a library, you can do it
this way.
-L/usr/local/petsc/arch-darwin-c-debug/lib/ -lpetsc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120418/08bdf61d/attachment.htm>
More information about the petsc-users
mailing list