# How to enable language C and language Fortran when installing package from cmake in order to make executable

**URL:** https://discourse.cmake.org/t/how-to-enable-language-c-and-language-fortran-when-installing-package-from-cmake-in-order-to-make-executable/2847
**Category:** Usage
**Created:** [February 25, 2021, 7:00pm UTC](https://discourse.cmake.org/t/how-to-enable-language-c-and-language-fortran-when-installing-package-from-cmake-in-order-to-make-executable/2847 "2021-02-25T19:00:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ognjano3](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/o/ecccb3/32.png) [@ognjano3](https://discourse.cmake.org/u/ognjano3)
#### Post date: [February 25, 2021, 7:00pm UTC](https://discourse.cmake.org/t/how-to-enable-language-c-and-language-fortran-when-installing-package-from-cmake-in-order-to-make-executable/2847/1 "2021-02-25T19:00:32Z")

</div>

I was trying to install this package from cmake shown in order to make an executable for lammps, but I got an error that my language C and language Fortran was not enabled. Any steps on what to do next would be appreciated.

 ![image](https://discourse.cmake.org/uploads/default/original/2X/5/54c5c5b7f34eea2ec711ddc57773aa2d13e1b340.png)

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 25, 2021, 7:20pm UTC](https://discourse.cmake.org/t/how-to-enable-language-c-and-language-fortran-when-installing-package-from-cmake-in-order-to-make-executable/2847/2 "2021-02-25T19:20:33Z")

</div>

What is the `project()` call at the top of your project? To find MPI’s C libraries, you need the C language enabled. Same with the CXX libraries. Also, what does the `find_package(MPI)` call look like?

Note that the error message given is a bit noisy and contains red herrings. It was fixed recently (CMake 3.20 I think).

---

<div class="post-metadata">

### Author: ![williamr](https://discourse.cmake.org/user_avatar/discourse.cmake.org/williamr/32/1238_2.png) [@williamr](https://discourse.cmake.org/u/williamr)
#### Post date: [February 25, 2021, 7:27pm UTC](https://discourse.cmake.org/t/how-to-enable-language-c-and-language-fortran-when-installing-package-from-cmake-in-order-to-make-executable/2847/3 "2021-02-25T19:27:28Z")

</div>

Aleksa,

Have you set up your environment for MPI? For example, are things like mpirun and mpicxx in your path?

Bill.
