Building lammps with MLIP and CONP module
I am trying to build lammps with MLIP along with an another module for applying constant potential (USER-CONP2) (from the https://github.com/srtee/lammps-USER-CONP2 repository). I can install lammps with MLIP I can install lammps with USER-CONP But I am unable to install them simultaneously.
I am trying to compile using cmake and even though it reached 100% it showed an error as shown below.
[100%] Linking CXX static library liblammps.a
[100%] Built target lammps
Scanning dependencies of target lmp
[100%] Building CXX object CMakeFiles/lmp.dir/home/Harkishan/lammps-27May2021/src/main.cpp.o
[100%] Linking CXX executable lmp
liblammps.a(pair_MLIP.cpp.o): In function `LAMMPS_NS::PairMLIP::compute(int, int)':
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:85: undefined reference to `MLIP_calc_nbh(int, int*, int*, int**, int, int, double**, int*, double**, double&, double*, double**)'
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:123: undefined reference to `MLIP_calc_cfg(int, double*, double**, int*, int*, double&, double**, double*)'
liblammps.a(pair_MLIP.cpp.o): In function `LAMMPS_NS::PairMLIP::~PairMLIP()':
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:67: undefined reference to `MLIP_finalize()'
liblammps.a(pair_MLIP.cpp.o): In function `LAMMPS_NS::PairMLIP::init_style()':
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:209: undefined reference to `MLIP_init(char const*, char const*, int, double&, int&)'
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:211: undefined reference to `MLIP_init(char const*, char const*, int, double&, int&)'
/home/Harkishan/lammps-27May2021/src/pair_MLIP.cpp:206: undefined reference to `MLIP_finalize()'
collect2: error: ld returned 1 exit status
CMakeFiles/lmp.dir/build.make:101: recipe for target 'lmp' failed
make[2]: *** [lmp] Error 1
CMakeFiles/Makefile2:1450: recipe for target 'CMakeFiles/lmp.dir/all' failed
make[1]: *** [CMakeFiles/lmp.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Please tell me how to rectify this error.
Yours Sincerely Harkishan Dua PhD Scholar Department of Physics Assam University Silchar