# CMAQ\_v5.2\_DDM-3D biuld

**URL:** <https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991>\
**Category:** Compiling\
**Created:** [October 2, 2019, 3:54pm UTC](https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991 "2019-10-02T15:54:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![huangj1311](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@huangj1311](https://forum.cmascenter.org/u/huangj1311)\
**Post date:** [October 2, 2019, 3:54pm UTC](https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991/1 "2019-10-02T15:54:41Z")

</div>

Hi Carlie and Liz et al.,

I am trying to install CMAQv5.2\_DDM-3D,

1. 

I built netcdf and ioapi with v5.2 and v5.3, installations was successful without ERROR.

1. 

I then git the repo for v5.2DDM 3D

and encountering undefined reference to nc\_XXX problem

> <https://github.com/JiaoyanHuang/Testing-codes/blob/master/bldit_cctm_ddm.log>

since v5.2 does not separate netcdf-c and netcdf-fortran

I ln -s all files in netcdf-fortran/lib and netcdf-fortran/include to netcdf-c lib and include

this worked fine for v5.2, but not for DDM-3D

1. here are the vars I had in the configuration file

Do I miss anything?

Thank you!

Joey

---

<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:** [October 2, 2019, 6:10pm UTC](https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991/2 "2019-10-02T18:10:23Z")

</div>

The order of libraries in make-variable NETCDF needs to be `-lnetcdff -lnetcdf`

The linker will look for things it needs in the first of these in the second: when the order is reversed, it tries to look for netcdf-C symbols in the netcdf-Fortran library (which is backwards) but not vice versa…

---

<div class="post-metadata">

**Author:** ![huangj1311](https://avatars.discourse-cdn.com/v4/letter/h/8edcca/32.png) [@huangj1311](https://forum.cmascenter.org/u/huangj1311)\
**Post date:** [October 2, 2019, 6:30pm UTC](https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991/3 "2019-10-02T18:30:01Z")

</div>

Carlie,

Thanks, it is working. Can EPA change the variable in configure file as it should be? otherwise, it is very confused.

Best,

Joey

---

<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:** [October 2, 2019, 6:50pm UTC](https://forum.cmascenter.org/t/cmaq-v5-2-ddm-3d-biuld/991/4 "2019-10-02T18:50:48Z")

</div>

Hi Joey,

I have fixed this in the CMAQv5.2\_DDM-3D branch.

> <https://github.com/USEPA/CMAQ/commit/eaff9f2fc68ff974e97b5f16277171c5faf6d58f>

Thanks, Liz
