<div dir="ltr"><div>> $ make getlinklibs</div><div><br></div>I suggest you define environment variables for your different builds and use them in your IDE's configuration setting. I do this with Qt Creator and I have been using my codes from two different linux machine and a also a Mac without any problem. Also remember that if you have several builds you should do<div>

<br></div><div>make PETSC_DIR=/path/to/petsc PETSC_ARCH=-petsc-arch getlinklibs<br><br><div class="gmail_quote">On Fri, Aug 24, 2012 at 6:50 AM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Configure found X11, but you aren't linking it. You have to link all the libraries returned by<div><br></div><div>
$ make getlinklibs</div>
<div><br></div><div>The output will vary depending on your system and configuration. Here's one of mine</div>
<div><br></div><div>-Wl,-rpath,/home/jed/petsc/mpich/lib -Wl,-rpath,/home/jed/petsc/mpich/lib -L/home/jed/petsc/mpich/lib -lpetscts -lpetscsnes -lpetscksp -lpetscdm -lpetscmat -lpetscvec -lpetscsys -Wl,-rpath,/home/jed/petsc/mpich/lib -L/home/jed/petsc/mpich/lib -ltriangle -lX11 -lchaco -lsuperlu_4.3 -lsuperlu_dist_3.0 -lparmetis -lmetis -Wl,-rpath,/home/jed/usr/elemental-mpich/lib -L/home/jed/usr/elemental-mpich/lib -lelemental -lplcg -lpmrrr -lamspub -lml -Wl,-rpath,/opt/mpich2/lib -L/opt/mpich2/lib -Wl,-rpath,/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1 -L/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.1 -lmpichcxx -lstdc++ -lpthread -lspai -lspooles -lblacs -lHYPRE -lmpichcxx -lstdc++ -lsundials_cvode -lsundials_nvecserial -lsundials_nvecparallel -Wl,-rpath,/usr/lib -L/usr/lib -lcholmod -lamd -lcolamd -lcamd -lccolamd -lumfpack -lcholmod -lcamd -lccolamd -lcolamd -lamd -lsuitesparseconfig -llapack -lblas -lm -lmpichf90 -lgfortran -lm -lgfortran -lm -lquadmath -lm -lmpichcxx -lstdc++ -ldl -lmpich -lopa -lmpl -lpthread -lrt -lgcc_s -ldl<div>

<div class="h5"><br>
<br><div class="gmail_quote">On Fri, Aug 24, 2012 at 8:47 AM, Arun Kamath <span dir="ltr"><<a href="mailto:arun.kamath.m@gmail.com" target="_blank">arun.kamath.m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


Hi!<div>I wanted to know if it is possible to build a PETSc file from an IDE, like codelite or code blocks.</div><div>On my attempt to do so after adding the libraries </div><div>libpestc.a, libhypre.a, libf2cblas.a and libf2clapack.a to the link libraries and</div>



<div>petsc/conf, petsc/include and pets/arch-darwin-c-debug/include to the complier search directories, the executable is not built and </div><div>errors similar to the one below are returned.</div><div><br></div><div><div>



"Linking console executable: /./examples/tutorials/ex2</div><div>Undefined symbols for architecture x86_64:</div><div>  "_XCreateGC", referenced from:</div><div>      _PetscDrawXiSetGC in libpetsc.a(xinit.o)</div>



</div><div><div>..........</div><div>ld: symbol(s) not found for architecture x86_64</div><div>collect2: error: ld returned 1 exit status"</div></div><div><br></div><div>Does anyone have a solution to this?</div><div>



Thanks.</div><span><font color="#888888"><div>-- <br><div dir="ltr">Arun Kamath <div>NTNU, Trondheim</div></div><br>
</div>
</font></span></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div>