[mpich-discuss] Adding libraries to the mpicc wrapper

Jeff Hammond jeff.science at gmail.com
Wed Jan 15 09:46:36 CST 2014

My attempts to add libraries to the right of the MPICH libs via mpicc
env vars proved unsuccessful.  Perhaps I am just stupid though.  The
good news is that you can just something like

alias mympicc="`mpicc -show` -L$YOUR_LIB_DIR -lyour"

and use mympicc like you would mpicc.


On Wed, Jan 15, 2014 at 8:55 AM, Matthieu Dorier
<matthieu.dorier at irisa.fr> wrote:
> Hello,
> I have written an ADIO backend that depends on a library. So far to make the
> use of the library transparent when compiling a program, I added the library
> at line 226 of the mpicc wrapper (mpilibs=" -lmpich -lmylibrary"). I'd like
> to know if there is a "cleaner" way of adding it: mpicc being generated from
> a template, there should be a way to simply set a variable somewhere for
> that, shouldn't it? How is it done for other ADIO backends?
> Thank you,
> Matthieu Dorier
> PhD student at ENS Rennes
> http://people.irisa.fr/Matthieu.Dorier
> _______________________________________________
> discuss mailing list     discuss at mpich.org
> To manage subscription options or unsubscribe:
> https://lists.mpich.org/mailman/listinfo/discuss

Jeff Hammond
jeff.science at gmail.com

More information about the discuss mailing list