<div dir="ltr">Hey Michael,<div><br></div><div style>I don&#39;t see any problem with 2). The only problem with 1) is people who use the older versions of netcdf might have trouble getting it to build again.</div><div style>

<br></div><div style>Do you know how old these versions you&#39;re talking about without nc-config are? I&#39;d say if 3.6.1 does have nc-config, using nc-config might be the best option since the library will tell us what we need then.</div>

<div style><br></div><div style>If any of the 3.6.* versions don&#39;t have nc-config then the second approach is probably the best.</div><div style><br></div><div style>Thanks,</div><div style>Doug</div></div><div class="gmail_extra">

<br><br><div class="gmail_quote">On Wed, Jan 2, 2013 at 11:42 AM, Michael Duda <span dir="ltr">&lt;<a href="mailto:duda@ucar.edu" target="_blank">duda@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi, Folks.<br>
<br>
It seems that some compilers are particular about the order of libraries<br>
that are passed to the linker; specifically, listing the base netCDF<br>
library before the Fortran interface library doesn&#39;t always work.<br>
<br>
There are a couple of approaches to solving this problem that occurred<br>
to me:<br>
<br>
1) We could use nc-config to tell us which flags we need to use;<br>
however, older versions of netCDF don&#39;t have nc-config.<br>
<br>
2) We could modify our Makefile logic for adding the &quot;-lnetcdff&quot; flag to<br>
look something like this<br>
<br>
CPPINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include<br>
FCINCLUDES = -I../inc -I$(NETCDF)/include -I$(PIO) -I$(PNETCDF)/include<br>
NCLIB = -lnetcdf<br>
NCLIBF = -lnetcdff<br>
LIBS = -L$(PIO) -L$(PNETCDF)/lib -L$(NETCDF)/lib -lpio -lpnetcdf<br>
<br>
ifneq ($(wildcard $(NETCDF)/lib/libnetcdff.*), ) # CHECK FOR NETCDF4<br>
        LIBS += $(NCLIBF)<br>
endif # CHECK FOR NETCDF4<br>
<br>
LIBS += $(NCLIB)<br>
<br>
<br>
I&#39;ve just tested the second option on yellowstone, and it appears to be<br>
working, and if there is no objection to pursuing this approach, I&#39;ll<br>
test it more thoroughly.<br>
<br>
Does anyone else have opinions, comments, or alternatives?<br>
<br>
Thanks,<br>
Michael<br>
_______________________________________________<br>
mpas-developers mailing list<br>
<a href="mailto:mpas-developers@mailman.ucar.edu">mpas-developers@mailman.ucar.edu</a><br>
<a href="http://mailman.ucar.edu/mailman/listinfo/mpas-developers" target="_blank">http://mailman.ucar.edu/mailman/listinfo/mpas-developers</a><br>
</blockquote></div><br></div>