[lammps-users] MEAM fortran Linking errors

Hi all,
I am a student at Oklahoma State University. I have recently downloaded “lammps-upgrade.tar” (ver 21 feb 07) to work on MEAM potential. I sucessfully used ifort to build MEAM library file “libmeam.a”. I want to run lammps on a single node machine. I sucessfully built “libmpi.a” in STUBS dir. I modified Makefile.serial to link “libmeam.a” (Attached file Makefile.serial_meam.txt). I used option “make yes-meam”. But I received errors (Attached file errors.txt) as I tried to link Fortran library to C++ code. Fortran compiler is “ifort”. C compiler is “g++”.
I appreciate your time and help.
Sincerely,
Rutuparna

Note: I can creat a “lmp_serial” without linking it to meam file without any problems.

Makefile.serial_meam.txt (854 Bytes)

errors.txt (4.31 KB)

Hi all,

rutuparna,

please try to link with ifort (instead of g++)
and then add -lstdc++ to the linker libraries.

you have to link with both, the fortran and the c++
runtime, but since the c++ runtime is only one library,
it is easier to link with ifort and than add the c++ support.

cheers,
   axel.