Hello,
I am currently using the C++ API of Lammps as described here: 1.4.1. Using the C++ API directly — LAMMPS documentation
However since updating from lammps-29Sep2021 to Lammps 2022Sep13, I encounter a compilation error when trying to import “input.h” in my project:
In file included from /home/matthieu/Lammps2022/install/include/lammps/input.h:17,
from /home/matthieu/myProject/source/src/Lammps/lammpsController.cpp:24:
/home/matthieu/Lammps2022/install/include/lammps/pointers.h:34:10: fatal error: platform.h: No such file or directory
#include "platform.h" // IWYU pragma: export
I limited the Lammps installation to the minimum necessary as follow:
wget https://download.lammps.org/tars/lammps-15Sep2022.tar.gz
tar -xf lammps-15Sep2022.tar.gz
cd lammps-15Sep2022
mkdir -p build
cd build
cmake ../cmake/ -DCMAKE_INSTALL_PREFIX:PATH=/home/matthieu/Lammps2022/install -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
make
make install
Looking at the install folder, the file “platform.h” is not present with the other headers. It is only available in the source folder. Note that this installation method worked fine with lammps-29Sep2021. I didn’t find any updates on how to compile a C++ external driver, so I was wondering if there are additional flags/instructions on how to use the C++ API, or if this might be a regression?
OS: Ubuntu 18.04
gcc 8
cmake version 3.20.0
Thank you for your assistance
Matthieu