Hi
I would like to use the fortran-c coupling example in /examples/COUPLE/simple directory. As given in the README and previous forum comments on this issue, the following commands were executed:
mpif90 -I/home/kamal/lammps3/16Aug13/src -c simple.f90
mpiCC -I/home/kamal/lammps3/16Aug13/src -c libfwrapper.c
mpif90 -L/home/kamal/lammps3/16Aug13/src simple.o libfwrapper.o -llammps_ufhpc -lstdc++ -lm -lmpi_cxx -o simpleF
But, it gave me following error:
simple.o: In function MAIN__': simple.f90:(.text+0x265): undefined reference to lammps_open_’
simple.f90:(.text+0x357): undefined reference to lammps_command_' simple.f90:(.text+0x36e): undefined reference to lammps_get_natoms_’
simple.f90:(.text+0x42d): undefined reference to lammps_gather_atoms_' simple.f90:(.text+0x47c): undefined reference to lammps_scatter_atoms_’
simple.f90:(.text+0x4e2): undefined reference to lammps_command_' simple.f90:(.text+0x4f1): undefined reference to lammps_close_’
simple.f90:(.text+0x571): undefined reference to `lammps_command_’
Could anyone help me to solve this problem?
Best Regards
Kamal Choudhary