# Undefined Reference to \* when building icon

**URL:** <https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234>\
**Category:** Compiling\
**Created:** [July 12, 2023, 8:00am UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234 "2023-07-12T08:00:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasol](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dasol](https://forum.cmascenter.org/u/dasol)\
**Post date:** [July 12, 2023, 8:00am UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234/1 "2023-07-12T08:00:46Z")

</div>

Hi all,

I got an error when I tried to build ICON. I think there is something wrong on my -lioapi, so I recompiled ioapi several times, but it still doesn’t work. Please, I need your help.

Makefile generated  
ifort -qopenmp UTILIO\_DEFN.o HGRD\_DEFN.o IC\_PARMS.o CGRID\_SPCS.o VGRD\_DEFN.o findex.o gc\_spc\_map.o get\_envlist.o icon.o lat\_lon.o lr\_interp.o lst\_spc\_map.o ngc\_spc\_map.o opn\_ic\_file.o setup\_logdev.o subhdomain.o prof\_driver.o prof\_icout.o prof\_vinterp.o -L/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib -L/home/dasol/Build\_CMAQ/ioapi-3.1/Linux2\_x86\_64ifort -lioapi -L/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/netcdf/lib -L/home/dasol/Build\_WRF/LIBRARIES/netcdf/lib -lnetcdf -lhdf5\_hl -lhdf5 -lcurl -o ICON\_v52\_profile.exe  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(desc3.o): In function `desc3_': desc3.F:(.text+0x2af): undefined reference to `ncagtc\_’  
desc3.F:(.text+0x450): undefined reference to `ncagt_' desc3.F:(.text+0x5d6): undefined reference to `ncagt\_’  
desc3.F:(.text+0x75c): undefined reference to `ncagt_' desc3.F:(.text+0x8e2): undefined reference to `ncagt\_’  
desc3.F:(.text+0xa6c): undefined reference to `ncagtc_' desc3.F:(.text+0xbfa): undefined reference to `ncagtc\_’  
desc3.F:(.text+0xd88): undefined reference to `ncagtc_' desc3.F:(.text+0xf6a): undefined reference to `ncagtc\_’  
desc3.F:(.text+0x1288): undefined reference to `ncagt_' desc3.F:(.text+0x1476): undefined reference to `ncanam\_’  
desc3.F:(.text+0x1684): undefined reference to `ncagt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(init3.o): In function `init3\_‘:  
init3.F:(.text+0x86): undefined reference to `ncpopt_' init3.F:(.text+0x99): undefined reference to `nf\_inq\_libvers\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(open3.o): In function `open3_': open3.F:(.text+0x785): undefined reference to `ncclos\_’  
open3.F:(.text+0x7a4): undefined reference to `ncclos_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3\_‘:  
opnfil3.F:(.text+0x105): undefined reference to `nf_open_' opnfil3.F:(.text+0x142): undefined reference to `ncagt\_’  
opnfil3.F:(.text+0x173): undefined reference to `ncagt_' opnfil3.F:(.text+0x1c9): undefined reference to `ncagt\_’  
opnfil3.F:(.text+0x1fa): undefined reference to `ncagt_' opnfil3.F:(.text+0x22b): undefined reference to `ncagt\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnfil3.o):opnfil3.F:(.text+0x25c): more undefined references to `ncagt_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3\_‘:  
opnfil3.F:(.text+0x5b4): undefined reference to `ncagtc_' opnfil3.F:(.text+0x5db): undefined reference to `ncvid\_’  
opnfil3.F:(.text+0x605): undefined reference to `ncdid_' opnfil3.F:(.text+0x63a): undefined reference to `ncdinq\_’  
opnfil3.F:(.text+0x794): undefined reference to `ncvid_' opnfil3.F:(.text+0x7e9): undefined reference to `ncagtc\_’  
opnfil3.F:(.text+0x872): undefined reference to `ncvid_' opnfil3.F:(.text+0x8d2): undefined reference to `ncvinq\_’  
opnfil3.F:(.text+0x908): undefined reference to `ncagtc_' opnfil3.F:(.text+0x971): undefined reference to `ncsnc\_’  
opnfil3.F:(.text+0x998): undefined reference to `ncclos_' opnfil3.F:(.text+0x9fa): undefined reference to `ncvid\_’  
opnfil3.F:(.text+0xa24): undefined reference to `ncvid_' opnfil3.F:(.text+0xa4e): undefined reference to `ncvid\_’  
opnfil3.F:(.text+0xa78): undefined reference to `ncvid_' opnfil3.F:(.text+0xa9e): undefined reference to `ncvid\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnfil3.o):opnfil3.F:(.text+0xbf2): more undefined references to `ncvid_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3\_‘:  
opnfil3.F:(.text+0x18a4): undefined reference to `ncredf_' opnfil3.F:(.text+0x18ef): undefined reference to `ncaptc\_’  
opnfil3.F:(.text+0x1941): undefined reference to `ncaptc_' opnfil3.F:(.text+0x195a): undefined reference to `ncendf\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnlog3.o): In function `opnlog3_': opnlog3.F:(.text+0xab): undefined reference to `ncagtc\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(shut3.o): In function `shut3_': shut3.F:(.text+0xd7): undefined reference to `ncclos\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrprofil.o): In function `wrprofil_': wrprofil.F:(.text+0x8c): undefined reference to `ncvpt1\_’  
wrprofil.F:(.text+0x1e4): undefined reference to `ncvpt_' wrprofil.F:(.text+0x32c): undefined reference to `ncvpt\_’  
wrprofil.F:(.text+0x475): undefined reference to `ncvpt_' wrprofil.F:(.text+0x5b4): undefined reference to `ncvpt\_’  
wrprofil.F:(.text+0x6f6): undefined reference to `ncvpt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrvars.o):wrvars.F:(.text+0x9f): more undefined references to `ncvpt\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(chkfil3.o): In function `chkfil3_': chkfil3.f:(.text+0x19f7): undefined reference to `ncagt\_’  
chkfil3.f:(.text+0x1b7f): undefined reference to `ncagt_' chkfil3.f:(.text+0x1d4f): undefined reference to `ncagt\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(ckfile3.o): In function `ckfile3_': ckfile3.f:(.text+0x8c5): undefined reference to `ncagt\_’  
ckfile3.f:(.text+0xa51): undefined reference to `ncagt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(close3.o): In function `close3\_‘:  
close3.f:(.text+0xce): undefined reference to `ncclos_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnlist3.o): In function `opnlist3\_’:  
opnlist3.f:(.text+0x76d): undefined reference to `ncclos_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(syncfid.o): In function `syncfid\_‘:  
syncfid.f:(.text+0x5c): undefined reference to `nf_sync_' syncfid.f:(.text+0x230): undefined reference to `nf\_sync\_’  
syncfid.f:(.text+0x277): undefined reference to `nf_sync_' syncfid.f:(.text+0x2f6): undefined reference to `nf\_sync\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrdict3.o): In function `wrdict3_': wrdict3.f:(.text+0xe9): undefined reference to `ncvgtc\_’  
wrdict3.f:(.text+0x2fa): undefined reference to `ncvptc_' wrdict3.f:(.text+0x4b0): undefined reference to `ncvpt1\_’  
wrdict3.f:(.text+0x645): undefined reference to `ncvpt1_' wrdict3.f:(.text+0x7d5): undefined reference to `ncvpt1\_’  
wrdict3.f:(.text+0x96a): undefined reference to `ncvpt1_' wrdict3.f:(.text+0xaff): undefined reference to `ncvpt1\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrdict3.o):wrdict3.f:(.text+0xc94): more undefined references to `ncvpt1_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrdict3.o): In function `wrdict3\_‘:  
wrdict3.f:(.text+0x130c): undefined reference to `ncvpt_' wrdict3.f:(.text+0x14be): undefined reference to `ncvpt1\_’  
wrdict3.f:(.text+0x1653): undefined reference to `ncvpt1_' wrdict3.f:(.text+0x17e8): undefined reference to `ncvpt1\_’  
wrdict3.f:(.text+0x197d): undefined reference to `ncvpt1_' wrdict3.f:(.text+0x1b12): undefined reference to `ncvpt1\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrdict3.o):wrdict3.f:(.text+0x1ca7): more undefined references to `ncvpt1_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrdict3.o): In function `wrdict3\_‘:  
wrdict3.f:(.text+0x2324): undefined reference to `ncvptc_' wrdict3.f:(.text+0x24f1): undefined reference to `ncvptc\_’  
wrdict3.f:(.text+0x26c9): undefined reference to `ncvptc_' wrdict3.f:(.text+0x28a1): undefined reference to `ncvptc\_’  
wrdict3.f:(.text+0x2a7d): undefined reference to `ncvptc_' wrdict3.f:(.text+0x2c3a): undefined reference to `ncvpt\_’  
wrdict3.f:(.text+0x2dda): undefined reference to `ncvpt1_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wriddata.o): In function `wriddata\_‘:  
wriddata.f:(.text+0x90): undefined reference to `ncvpt1_' wriddata.f:(.text+0x20f): undefined reference to `ncvpt\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrsmatrx.o): In function `wrsmatrx_': wrsmatrx.f:(.text+0xaf): undefined reference to `ncvpt\_’  
wrsmatrx.f:(.text+0x204): undefined reference to `ncvpt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrtflag.o): In function `wrtflag\_‘:  
wrtflag.f:(.text+0xc0): undefined reference to `ncvpt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3\_’:  
crtfil3.F:(.text+0xb9): undefined reference to `nf_create_' crtfil3.F:(.text+0x125): undefined reference to `ncaptc\_’  
crtfil3.F:(.text+0x173): undefined reference to `ncaptc_' crtfil3.F:(.text+0x1ba): undefined reference to `ncapt\_’  
crtfil3.F:(.text+0x1f2): undefined reference to `ncapt_' crtfil3.F:(.text+0x22a): undefined reference to `ncapt\_’  
crtfil3.F:(.text+0x262): undefined reference to `ncapt_' crtfil3.F:(.text+0x29a): undefined reference to `ncapt\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crtfil3.o):crtfil3.F:(.text+0x319): more undefined references to `ncapt_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3\_‘:  
crtfil3.F:(.text+0x93e): undefined reference to `ncaptc_' crtfil3.F:(.text+0x990): undefined reference to `ncaptc\_’  
crtfil3.F:(.text+0x9ee): undefined reference to `ncaptc_' crtfil3.F:(.text+0xa3c): undefined reference to `ncaptc\_’  
crtfil3.F:(.text+0xa8a): undefined reference to `ncaptc_' crtfil3.F:(.text+0xadd): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0xb07): undefined reference to `ncddef_' crtfil3.F:(.text+0xb35): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0xb7a): undefined reference to `ncddef_' crtfil3.F:(.text+0xc15): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0xc76): undefined reference to `ncaptc_' crtfil3.F:(.text+0xce5): undefined reference to `ncaptc\_’  
crtfil3.F:(.text+0xd36): undefined reference to `ncaptc_' crtfil3.F:(.text+0xd94): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0xdc6): undefined reference to `ncddef_' crtfil3.F:(.text+0xe3a): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0xe6c): undefined reference to `ncddef_' crtfil3.F:(.text+0xed7): undefined reference to `ncddef\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crtfil3.o):crtfil3.F:(.text+0xf09): more undefined references to `ncddef_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3\_‘:  
crtfil3.F:(.text+0xf5d): undefined reference to `ncvdef_' crtfil3.F:(.text+0xfb7): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1009): undefined reference to `ncddef_' crtfil3.F:(.text+0x1037): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0x107a): undefined reference to `ncvdef_' crtfil3.F:(.text+0x10ce): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1114): undefined reference to `ncvdef_' crtfil3.F:(.text+0x115a): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x11a0): undefined reference to `ncvdef_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o):crtfil3.F:(.text+0x11e6): more undefined references to `ncvdef\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3_': crtfil3.F:(.text+0x1332): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0x1360): undefined reference to `ncddef_' crtfil3.F:(.text+0x13a3): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x13f7): undefined reference to `ncvdef_' crtfil3.F:(.text+0x143d): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1483): undefined reference to `ncvdef_' crtfil3.F:(.text+0x14c9): undefined reference to `ncvdef\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crtfil3.o):crtfil3.F:(.text+0x150f): more undefined references to `ncvdef_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3\_‘:  
crtfil3.F:(.text+0x158e): undefined reference to `ncddef_' crtfil3.F:(.text+0x15d1): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1625): undefined reference to `ncvdef_' crtfil3.F:(.text+0x16d9): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0x173f): undefined reference to `ncddef_' crtfil3.F:(.text+0x1771): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0x17cc): undefined reference to `ncddef_' crtfil3.F:(.text+0x1912): undefined reference to `ncabor\_’  
crtfil3.F:(.text+0x1935): undefined reference to `ncddef_' crtfil3.F:(.text+0x1963): undefined reference to `ncddef\_’  
crtfil3.F:(.text+0x1991): undefined reference to `ncddef_' crtfil3.F:(.text+0x19e9): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1a55): undefined reference to `ncvdef_' crtfil3.F:(.text+0x1a9b): undefined reference to `ncvdef\_’  
crtfil3.F:(.text+0x1ae1): undefined reference to `ncvdef_' crtfil3.F:(.text+0x1b27): undefined reference to `ncvdef\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crtfil3.o):crtfil3.F:(.text+0x1c5c): more undefined references to `ncvdef_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crtfil3.o): In function `crtfil3\_‘:  
crtfil3.F:(.text+0x1cc7): undefined reference to `ncaptc_' crtfil3.F:(.text+0x1d1c): undefined reference to `ncaptc\_’  
crtfil3.F:(.text+0x1d71): undefined reference to `ncaptc_' crtfil3.F:(.text+0x1e69): undefined reference to `ncapt\_’  
crtfil3.F:(.text+0x1ed8): undefined reference to `ncapt_' crtfil3.F:(.text+0x1f5f): undefined reference to `ncendf\_’  
crtfil3.F:(.text+0x2647): undefined reference to `ncsnc_' crtfil3.F:(.text+0x2772): undefined reference to `ncvpt\_’  
crtfil3.F:(.text+0x2b54): undefined reference to `ncabor_' crtfil3.F:(.text+0x2d99): undefined reference to `ncabor\_’  
crtfil3.F:(.text+0x38c5): undefined reference to `ncclos_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(m3abort.o): In function `m3abort\_‘:  
m3abort.F:(.text+0x151): undefined reference to `nf_strerror_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(rdvars.o): In function `rdvars\_’:  
rdvars.F:(.text+0x97): undefined reference to `ncvgt_' rdvars.F:(.text+0x2d0): undefined reference to `ncvgt\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrgrnest.o): In function `wrgrnest_': wrgrnest.F:(.text+0x8c): undefined reference to `ncvpt1\_’  
wrgrnest.F:(.text+0x1e4): undefined reference to `ncvpt_' wrgrnest.F:(.text+0x32c): undefined reference to `ncvpt\_’  
wrgrnest.F:(.text+0x475): undefined reference to `ncvpt_' wrgrnest.F:(.text+0x5b4): undefined reference to `ncvpt\_’  
wrgrnest.F:(.text+0x6f6): undefined reference to `ncvpt_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrgrnest.o):wrgrnest.F:(.text+0x839): more undefined references to `ncvpt\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(crdict3.o): In function `crdict3_': crdict3.f:(.text+0x41): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x175): undefined reference to `ncabor_' crdict3.f:(.text+0x19c): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x2d0): undefined reference to `ncabor_' crdict3.f:(.text+0x2f7): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x42b): undefined reference to `ncabor_' crdict3.f:(.text+0x452): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x585): undefined reference to `ncabor_' crdict3.f:(.text+0x5ac): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x6e3): undefined reference to `ncabor_' crdict3.f:(.text+0x70a): undefined reference to `ncddef\_’  
crdict3.f:(.text+0x841): undefined reference to `ncabor_' crdict3.f:(.text+0x87e): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x9bb): undefined reference to `ncabor_' crdict3.f:(.text+0xa11): undefined reference to `ncaptc\_’  
crdict3.f:(.text+0xb46): undefined reference to `ncabor_' crdict3.f:(.text+0xb94): undefined reference to `ncaptc\_’  
crdict3.f:(.text+0xcc9): undefined reference to `ncabor_' crdict3.f:(.text+0x2770): undefined reference to `ncapt\_’  
crdict3.f:(.text+0x28a5): undefined reference to `ncabor_' crdict3.f:(.text+0x2911): undefined reference to `ncaptc\_’  
crdict3.f:(.text+0x2a46): undefined reference to `ncabor_' crdict3.f:(.text+0x2a86): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x2b0f): undefined reference to `ncvdef_' crdict3.f:(.text+0x2ba0): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x2c1f): undefined reference to `ncvdef_' crdict3.f:(.text+0x2c9f): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x2de2): undefined reference to `ncabor_' crdict3.f:(.text+0x2e4a): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x2fe6): undefined reference to `ncabor_' crdict3.f:(.text+0x303d): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x31d2): undefined reference to `ncabor_' crdict3.f:(.text+0x321e): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x33b3): undefined reference to `ncabor_' crdict3.f:(.text+0x3412): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x35a7): undefined reference to `ncabor_' crdict3.f:(.text+0x35fb): undefined reference to `ncvdef\_’  
crdict3.f:(.text+0x3790): undefined reference to `ncabor_' crdict3.f:(.text+0x380d): undefined reference to `ncaptc\_’  
crdict3.f:(.text+0x3862): undefined reference to `ncaptc_' crdict3.f:(.text+0x3899): undefined reference to `ncendf\_’  
crdict3.f:(.text+0x39c8): undefined reference to `ncabor_' crdict3.f:(.text+0x3b8d): undefined reference to `ncabor\_’  
crdict3.f:(.text+0x3d34): undefined reference to `ncabor_' crdict3.f:(.text+0x3eb9): undefined reference to `ncabor\_’  
crdict3.f:(.text+0x403e): undefined reference to `ncabor_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(crdict3.o):crdict3.f:(.text+0x41c6): more undefined references to `ncabor\_’ follow  
make: \*\*\* [ICON\_v52\_profile.exe] Error 1  
**ERROR** while running make command

else  
endif  
mv Makefile Makefile.intel  
mv: ‘Makefile’ and ‘Makefile.intel’ are the same file  
ln -s Makefile.intel Makefile  
ln: failed to create symbolic link ‘Makefile’: File exists  
if ( 1 != 0 ) then  
echo \*\*\* failure in /home/dasol/CMAQ\_v5.2.1/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
\*\*\* failure in /home/dasol/CMAQ\_v5.2.1/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
exit 1

---

<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:** [July 12, 2023, 11:04am UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234/2 "2023-07-12T11:04:14Z")

</div>

Which I/O API version? Which netCDF version? (You need I/O API 3.2 for netCDF4). 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):

> Evidently, starting with netCDF-Fortran 4.4.2, UCAR in their wisdom decided to silently eliminate the CALL NC\*() Fortran interfaces in terms of which the I/O API was originally implemented. [If you can find any documentation indicating this intent on the web, I would enjoy seeing it; I can’t find it.]
> 
> I/O API Version 3.2 was tediously re-coded to replace all 943 of these calls by the newer IERR=NF\_\*() Fortran interfaces that are still supported. Prior editions of the I/O API will have link errors with netCDF-Fortran 4.4.2 or later, because routines such as NCCLOS() are no longer in that library.

---

<div class="post-metadata">

**Author:** ![dasol](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dasol](https://forum.cmascenter.org/u/dasol)\
**Post date:** [July 13, 2023, 2:04am UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234/3 "2023-07-13T02:04:20Z")

</div>

Thank you for your help.  
I was using netcdf-4.1.3 and ioapi-3.1.  
As you said, I installed ioapi-3.2 and recompiled bldit\_icon.csh, but similar error detected.  
Please, I need your help.

Makefile generated  
mpiifort -qopenmp UTILIO\_DEFN.o HGRD\_DEFN.o IC\_PARMS.o CGRID\_SPCS.o VGRD\_DEFN.o findex.o gc\_spc\_map.o get\_envlist.o icon.o lat\_lon.o lr\_interp.o lst\_spc\_map.o ngc\_spc\_map.o opn\_ic\_file.o setup\_logdev.o subhdomain.o prof\_driver.o prof\_icout.o prof\_vinterp.o -L/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib -lioapi -L/home/dasol/Build\_CMAQ/ioapi-3.2/Linux2\_x86\_64ifort -L/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/netcdf/lib -lnetcdf -L/home/dasol/Build\_WRF/LIBRARIES/netcdf/lib -lcurl -o ICON\_v52\_profile.exe  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(desc3.o): In function `desc3_': desc3.F90:(.text+0x2fb): undefined reference to `nf\_get\_att\_text\_’  
desc3.F90:(.text+0x479): undefined reference to `nf_get_att_int_' desc3.F90:(.text+0x5cf): undefined reference to `nf\_get\_att\_int\_’  
desc3.F90:(.text+0x725): undefined reference to `nf_get_att_int_' desc3.F90:(.text+0x87b): undefined reference to `nf\_get\_att\_int\_’  
desc3.F90:(.text+0x9d7): undefined reference to `nf_get_att_text_' desc3.F90:(.text+0xb2d): undefined reference to `nf\_get\_att\_text\_’  
desc3.F90:(.text+0xc83): undefined reference to `nf_get_att_text_' desc3.F90:(.text+0xe68): undefined reference to `nf\_get\_att\_text\_’  
desc3.F90:(.text+0x1198): undefined reference to `nf_inq_varnatts_' desc3.F90:(.text+0x13c9): undefined reference to `nf\_inq\_attname\_’  
desc3.F90:(.text+0x15de): undefined reference to `nf_get_att_real_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(init3.o): In function `init3\_‘:  
init3.F90:(.text+0x8d): undefined reference to `nf_inq_libvers_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(open3.o): In function `open3\_’:  
open3.F90:(.text+0xbfe): undefined reference to `nf_close_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3\_‘:  
opnfil3.F90:(.text+0xfd): undefined reference to `nf_open_' opnfil3.F90:(.text+0x136): undefined reference to `nf\_get\_att\_int\_’  
opnfil3.F90:(.text+0x164): undefined reference to `nf_get_att_int_' opnfil3.F90:(.text+0x1b7): undefined reference to `nf\_get\_att\_int\_’  
opnfil3.F90:(.text+0x1e5): undefined reference to `nf_get_att_int_' opnfil3.F90:(.text+0x213): undefined reference to `nf\_get\_att\_int\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnfil3.o):opnfil3.F90:(.text+0x241): more undefined references to `nf_get_att_int_' follow /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3\_‘:  
opnfil3.F90:(.text+0x327): undefined reference to `nf_get_att_double_' opnfil3.F90:(.text+0x355): undefined reference to `nf\_get\_att\_double\_’  
opnfil3.F90:(.text+0x383): undefined reference to `nf_get_att_double_' opnfil3.F90:(.text+0x3b1): undefined reference to `nf\_get\_att\_double\_’  
opnfil3.F90:(.text+0x3df): undefined reference to `nf_get_att_double_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o):opnfil3.F90:(.text+0x40d): more undefined references to `nf\_get\_att\_double\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3_': opnfil3.F90:(.text+0x4c5): undefined reference to `nf\_get\_att\_int\_’  
opnfil3.F90:(.text+0x4f3): undefined reference to `nf_get_att_real_' opnfil3.F90:(.text+0x527): undefined reference to `nf\_get\_att\_real\_’  
opnfil3.F90:(.text+0x568): undefined reference to `nf_get_att_text_' opnfil3.F90:(.text+0x590): undefined reference to `nf\_inq\_varid\_’  
opnfil3.F90:(.text+0x5b4): undefined reference to `nf_inq_dimid_' opnfil3.F90:(.text+0x5d6): undefined reference to `nf\_inq\_dimlen\_’  
opnfil3.F90:(.text+0x735): undefined reference to `nf_inq_varid_' opnfil3.F90:(.text+0x784): undefined reference to `nf\_get\_att\_text\_’  
opnfil3.F90:(.text+0x812): undefined reference to `nf_inq_varid_' opnfil3.F90:(.text+0x850): undefined reference to `nf\_inq\_var\_’  
opnfil3.F90:(.text+0x885): undefined reference to `nf_get_att_text_' opnfil3.F90:(.text+0x8ea): undefined reference to `nf\_sync\_’  
opnfil3.F90:(.text+0x912): undefined reference to `nf_close_' opnfil3.F90:(.text+0x969): undefined reference to `nf\_close\_’  
opnfil3.F90:(.text+0x9ef): undefined reference to `nf_inq_varid_' opnfil3.F90:(.text+0xa17): undefined reference to `nf\_inq\_varid\_’  
opnfil3.F90:(.text+0xa3f): undefined reference to `nf_inq_varid_' opnfil3.F90:(.text+0xa67): undefined reference to `nf\_inq\_varid\_’  
opnfil3.F90:(.text+0xa8b): undefined reference to `nf_inq_varid_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnfil3.o):opnfil3.F90:(.text+0xbdc): more undefined references to `nf\_inq\_varid\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(opnfil3.o): In function `opnfil3_': opnfil3.F90:(.text+0x185d): undefined reference to `nf\_redef\_’  
opnfil3.F90:(.text+0x1893): undefined reference to `nf_put_att_text_' opnfil3.F90:(.text+0x18d4): undefined reference to `nf\_put\_att\_text\_’  
opnfil3.F90:(.text+0x18ea): undefined reference to `nf_enddef_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnlog3.o): In function `opnlog3\_‘:  
opnlog3.F90:(.text+0x112): undefined reference to `nf_get_att_text_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(shut3.o): In function `shut3\_’:  
shut3.F90:(.text+0xda): undefined reference to `nf_close_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(syncfid.o): In function `syncfid\_‘:  
syncfid.F90:(.text+0x6d): undefined reference to `nf_sync_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrgrnest.o): In function `wrgrnest\_’:  
wrgrnest.F90:(.text+0x88): undefined reference to `nf_put_var1_int_' wrgrnest.F90:(.text+0x1da): undefined reference to `nf\_put\_vara\_int\_’  
wrgrnest.F90:(.text+0x328): undefined reference to `nf_put_vara_int_' wrgrnest.F90:(.text+0x46f): undefined reference to `nf\_put\_vara\_int\_’  
wrgrnest.F90:(.text+0x5ac): undefined reference to `nf_put_vara_int_' wrgrnest.F90:(.text+0x6ec): undefined reference to `nf\_put\_vara\_double\_’  
wrgrnest.F90:(.text+0x82d): undefined reference to `nf_put_vara_double_' wrgrnest.F90:(.text+0x96e): undefined reference to `nf\_put\_vara\_double\_’  
wrgrnest.F90:(.text+0xaaf): undefined reference to `nf_put_vara_double_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrprofil.o): In function `wrprofil\_‘:  
wrprofil.F90:(.text+0x89): undefined reference to `nf_put_var1_int_' wrprofil.F90:(.text+0x1d8): undefined reference to `nf\_put\_vara\_int\_’  
wrprofil.F90:(.text+0x327): undefined reference to `nf_put_vara_int_' wrprofil.F90:(.text+0x477): undefined reference to `nf\_put\_vara\_double\_’  
wrprofil.F90:(.text+0x5bc): undefined reference to `nf_put_vara_double_' wrprofil.F90:(.text+0x701): undefined reference to `nf\_put\_vara\_double\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrvars.o): In function `wrvars_': wrvars.F90:(.text+0xc8): undefined reference to `nf\_put\_vara\_double\_’  
wrvars.F90:(.text+0xeb): undefined reference to `nf_put_vara_int64_' wrvars.F90:(.text+0x111): undefined reference to `nf\_put\_vara\_real\_’  
wrvars.F90:(.text+0x185): undefined reference to `nf_put_vara_int_' wrvars.F90:(.text+0x239): undefined reference to `nf\_put\_vara\_int\_’  
wrvars.F90:(.text+0x404): undefined reference to `nf_put_vara_double_' wrvars.F90:(.text+0x432): undefined reference to `nf\_put\_vara\_int64\_’  
wrvars.F90:(.text+0x467): undefined reference to `nf_put_vara_real_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(m3abort.o): In function `m3abort\_‘:  
m3abort.f90:(.text+0x158): undefined reference to `nf_strerror_' m3abort.f90:(.text+0x199): undefined reference to `nf\_abort\_’  
m3abort.f90:(.text+0x1c2): undefined reference to `nf_strerror_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(opnlist3.o): In function `opnlist3\_‘:  
opnlist3.f90:(.text+0x843): undefined reference to `nf_close_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrdict3.o): In function `wrdict3\_’:  
wrdict3.f90:(.text+0xf0): undefined reference to `nf_put_vara_text_' wrdict3.f90:(.text+0x343): undefined reference to `nf\_put\_vara\_text\_’  
wrdict3.f90:(.text+0x3a1): undefined reference to `nf_put_vara_int_' wrdict3.f90:(.text+0x3cf): undefined reference to `nf\_put\_vara\_int\_’  
wrdict3.f90:(.text+0x400): undefined reference to `nf_put_vara_int_' wrdict3.f90:(.text+0x42e): undefined reference to `nf\_put\_vara\_int\_’  
wrdict3.f90:(.text+0x45c): undefined reference to `nf_put_vara_int_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrdict3.o):wrdict3.f90:(.text+0x48d): more undefined references to `nf\_put\_vara\_int\_’ follow  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wrdict3.o): In function `wrdict3_': wrdict3.f90:(.text+0x564): undefined reference to `nf\_put\_vara\_real\_’  
wrdict3.f90:(.text+0x5c2): undefined reference to `nf_put_vara_double_' wrdict3.f90:(.text+0x5f0): undefined reference to `nf\_put\_vara\_double\_’  
wrdict3.f90:(.text+0x61e): undefined reference to `nf_put_vara_double_' wrdict3.f90:(.text+0x64c): undefined reference to `nf\_put\_vara\_double\_’  
wrdict3.f90:(.text+0x67a): undefined reference to `nf_put_vara_double_' /home/dasol/CMAQ_v5.2.1/lib/x86_64/intel/ioapi/lib/libioapi.a(wrdict3.o):wrdict3.f90:(.text+0x6a8): more undefined references to `nf\_put\_vara\_double\_’ follow

…

/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(rdatt3.o): In function `rdatt3_': rdatt3.F90:(.text+0x7e6): undefined reference to `nf\_get\_att\_text\_’  
/home/dasol/CMAQ\_v5.2.1/lib/x86\_64/intel/ioapi/lib/libioapi.a(wratt3.o): In function `wrattc_': wratt3.F90:(.text+0x3fb): undefined reference to `nf\_redef\_’  
wratt3.F90:(.text+0x5a4): undefined reference to `nf_put_att_double_' wratt3.F90:(.text+0x5de): undefined reference to `nf\_put\_att\_real\_’  
wratt3.F90:(.text+0x615): undefined reference to `nf_put_att_int_' wratt3.F90:(.text+0x650): undefined reference to `nf\_put\_att\_text\_’  
wratt3.F90:(.text+0x7b0): undefined reference to `nf\_enddef\_’  
make: \*\*\* [ICON\_v52\_profile.exe] Error 1  
**ERROR** while running make command

else  
endif  
mv Makefile Makefile.intel  
mv: ‘Makefile’ and ‘Makefile.intel’ are the same file  
ln -s Makefile.intel Makefile  
ln: failed to create symbolic link ‘Makefile’: File exists  
if ( 1 != 0 ) then  
echo \*\*\* failure in /home/dasol/CMAQ\_v5.2.1/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
\*\*\* failure in /home/dasol/CMAQ\_v5.2.1/UTIL/bldmake/bldmake\_intel.exe -serial -verbose \*\*\*  
exit 1

---

<div class="post-metadata">

**Author:** ![dasol](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@dasol](https://forum.cmascenter.org/u/dasol)\
**Post date:** [July 13, 2023, 2:29am UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234/4 "2023-07-13T02:29:12Z")

</div>

Sorry, I didn’t read your attachment.

I should have changed some codes after upgrading version of ioapi.

I successfully compiled icon thanks to you.

I really appreciate your help.

---

<div class="post-metadata">

**Author:** ![lizadams](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@lizadams](https://forum.cmascenter.org/u/lizadams)\
**Post date:** [February 4, 2025, 2:15pm UTC](https://forum.cmascenter.org/t/undefined-reference-to-when-building-icon/4234/6 "2025-02-04T14:15:46Z")

</div>

Please start a new issue after reading the tips on posting an issue. [PLEASE READ before posting](https://forum.cmascenter.org/t/please-read-before-posting/1321)
