# Compiling camx2ioapi program

**URL:** <https://forum.cmascenter.org/t/compiling-camx2ioapi-program/693>\
**Category:** I/O API\
**Created:** [May 17, 2019, 5:58pm UTC](https://forum.cmascenter.org/t/compiling-camx2ioapi-program/693 "2019-05-17T17:58:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsanzine](https://avatars.discourse-cdn.com/v4/letter/n/c67d28/32.png) [@nsanzine](https://forum.cmascenter.org/u/nsanzine)\
**Post date:** [May 17, 2019, 5:58pm UTC](https://forum.cmascenter.org/t/compiling-camx2ioapi-program/693/1 "2019-05-17T17:58:27Z")

</div>

Hi all,

I am trying to compile camx2ioapi program and I am getting errors with first couple lines below:

pgf90 -I/home/ec2-user/utilities/ioapi -mcmodel=medium -O2 -Mdalign -Mnoframe -byteswapio -Bstatic\_pgi -c camx2ioapi.f  
pgf90 -mcmodel=medium -O2 -Mdalign -Mnoframe -byteswapio -Bstatic\_pgi -o camx2ioapi camx2ioapi.o -L/home/ec2-user/utilities/Linux2\_x  
/home/ec2-user/utilities/Linux2\_x86\_64pg/libioapi.a(init3.o): In function `init3_': /home/ec2-user/utilities//ioapi/init3.F90:168: undefined reference to`nf\_inq\_libvers\_’  
/home/ec2-user/utilities/Linux2\_x86\_64pg/libioapi.a(open3.o): In function `open3_': /home/ec2-user/utilities//ioapi/open3.F90:491: undefined reference to`nf\_close\_’  
/home/ec2-user/utilities/Linux2\_x86\_64pg/libioapi.a(opnfil3.o): In function `opnfil3_': /home/ec2-user/utilities//ioapi/opnfil3.F90:145: undefined reference to`nf\_open\_’  
/home/ec2-user/utilities//ioapi/opnfil3.F90:158: undefined reference to `nf_get_att_int_' /home/ec2-user/utilities//ioapi/opnfil3.F90:167: undefined reference to`nf\_get\_att\_int\_’  
/home/ec2-user/utilities//ioapi/opnfil3.F90:183: undefined reference to `nf\_inq\_varid\_’

The rest of the errors are pretty much similar. I successfully built netcdf and IOAPI. I generated libioapi.a and got m3tools programs. I am not sure why I am getting this error. I am using pgf compiler on Linux2\_x86\_64 platform. I used the the following command to build IOAPI:

make -d BIN=Linux2\_x86\_64pg CPLMODE=nocpl INSTALL=/home/ec2-user/utilities

What am I missing ?

---

<div class="post-metadata">

**Author:** ![cjcoats](https://avatars.discourse-cdn.com/v4/letter/c/ac8455/32.png) [@cjcoats](https://forum.cmascenter.org/u/cjcoats)\
**Post date:** [May 23, 2019, 8:25am UTC](https://forum.cmascenter.org/t/compiling-camx2ioapi-program/693/2 "2019-05-23T08:25:53Z")

</div>

See [https://www.cmascenter.org/ioapi/documentation/all\_versions/html/AVAIL.html#ncf4](https://www.cmascenter.org/ioapi/documentation/all_versions/html/AVAIL.html#ncf4): I suspect that you didn’t build netCDF as recommended, and you need to run  
nc-config --libs  
nf-config --libs  
to see what to doi
