# Error compiling gromacs 2022.2 with CP2K 9.1

**URL:** <https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2022-2-with-cp2k-9-1/4391>\
**Category:** User discussions\
**Tags:** qm-mm\
**Created:** [June 30, 2022, 3:20pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2022-2-with-cp2k-9-1/4391 "2022-06-30T15:20:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mario](https://gromacs.bioexcel.eu/u/mario)\
**Post date:** [June 30, 2022, 3:20pm UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2022-2-with-cp2k-9-1/4391/1 "2022-06-30T15:20:21Z")

</div>

GROMACS version:2022.2  
GROMACS modification: Yes/No  
Here post your question  
Hi everybody.  
I have some troubles compiling Gromacs with CP2K. I have the following error:  
gromacs-2022.2/src/gromacs/applied\_forces/qmmm/qmmmforceprovider.cpp:56:10: fatal error: libcp2k.h: file not found  
56 | #include \<libcp2k.h\>  
| ^ ~~~~~~~~~~

Can you help me to solve this? I don know what i can more to do. I try this command:  
cmake … -DGMX\_BUILD\_OWN\_FFTW=ON -DGMX\_MPI=on -DGMX\_GPU=CUDA -DCUDA\_TOOLKIT\_ROOT\_DIR=/usr/local/cuda-11.7 -DCMAKE\_INSTALL\_PREFIX=/opt/gromacs -DGMX\_CP2K=ON -DCP2K\_DIR=“/opt/cp2k/lib/local/” -DCP2K\_LINKER\_FLAGS=“local.psmp \ /opt/cp2k/src/start/”  
But this doesn’t work.  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![bauchi\_99](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@bauchi\_99](https://gromacs.bioexcel.eu/u/bauchi_99)\
**Post date:** [September 1, 2022, 5:03am UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2022-2-with-cp2k-9-1/4391/2 "2022-09-01T05:03:05Z")

</div>

Hello, I am facing this issue, Did you solve it.

---

<div class="post-metadata">

**Author:** ![dmorozov](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dmorozov](https://gromacs.bioexcel.eu/u/dmorozov)\
**Post date:** [October 25, 2022, 7:44am UTC](https://gromacs.bioexcel.eu/t/error-compiling-gromacs-2022-2-with-cp2k-9-1/4391/3 "2022-10-25T07:44:18Z")

</div>

Hi,

have you solved that problem?  
If not could you post your cmake command?
