[petsc-users] building Petsc in an IDE
Mohammad Mirzadeh
mirzadeh at gmail.com
Fri Aug 24 17:16:32 CDT 2012
> $ make getlinklibs
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
make PETSC_DIR=/path/to/petsc PETSC_ARCH=-petsc-arch getlinklibs
On Fri, Aug 24, 2012 at 6:50 AM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
> Configure found X11, but you aren't linking it. You have to link all the
> libraries returned by
>
> $ make getlinklibs
>
> The output will vary depending on your system and configuration. Here's
> one of mine
>
> -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
>
>
> On Fri, Aug 24, 2012 at 8:47 AM, Arun Kamath <arun.kamath.m at gmail.com>wrote:
>
>> Hi!
>> I wanted to know if it is possible to build a PETSc file from an IDE,
>> like codelite or code blocks.
>> On my attempt to do so after adding the libraries
>> libpestc.a, libhypre.a, libf2cblas.a and libf2clapack.a to the link
>> libraries and
>> petsc/conf, petsc/include and pets/arch-darwin-c-debug/include to the
>> complier search directories, the executable is not built and
>> errors similar to the one below are returned.
>>
>> "Linking console executable: /./examples/tutorials/ex2
>> Undefined symbols for architecture x86_64:
>> "_XCreateGC", referenced from:
>> _PetscDrawXiSetGC in libpetsc.a(xinit.o)
>> ..........
>> ld: symbol(s) not found for architecture x86_64
>> collect2: error: ld returned 1 exit status"
>>
>> Does anyone have a solution to this?
>> Thanks.
>> --
>> Arun Kamath
>> NTNU, Trondheim
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120824/b3e93aff/attachment.html>
More information about the petsc-users
mailing list