<div dir="ltr">On Mon, Oct 21, 2013 at 2:31 PM, Anthony Vergottis <span dir="ltr"><<a href="mailto:a.vergottis@ucl.ac.uk" target="_blank">a.vergottis@ucl.ac.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Dear All,<br><br></div>I was wondering how does one include a .so object when compiling with a PETSc makefile? I have made various .so object for many projects and they work properly by specifying the -L location and the -lLibrary name. But when I try to link the .so object via a PETSc make file (after compilation with no errors) the ldd command does not show the library as being linked.<br>
</div></div></div></div></div></div></blockquote><div><br></div><div>If you are in Linux (it looks like you are), then you will need -rpath along with -L to get the shared library picked up. Look at the PETSc link line.</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"><div dir="ltr"><div><div><div><div><div></div>Is there any internal behaviour of PETSc I should be aware of? Have tried everything possible.<br>
</div><br></div>I have configure PETSc with the following flags (if this helps).<br><br>--download-mpich --with-clanguage=c++ --download-f-blas-lapack --download-metis --download-parmetis --with-shared-libraries=1 --with-dynamic-loading=1<br>
<br></div>This is the sample makefile:<br><br>include ${PETSC_DIR}/conf/variables<br>include ${PETSC_DIR}/conf/rules<br>LIBS=-L/home/adonis/Dropbox/ParallelSolver -lpro<br><br>pro: pro.o 2D_CBS_Solver.o <br> ${CLINKER} -o pro pro.o 2D_CBS_Solver.o ${PETSC_LIB} ${LIBS} <br>
${RM} pro.o 2D_CBS_Solver.o<br></div><div><br></div><div>After this makefile is run still ldd does not show linkage.<br></div><div><br>Any help would be appreciated. Thanks in advance.<br><br></div>Best regards,<br>
<div><div><div><div><div><div><div>Anthony <br><br></div></div></div></div></div></div></div></div>
</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
</div></div>