# Make can't find header nor namespaces

**URL:** <https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384>\
**Category:** Library Questions\
**Created:** [February 24, 2023, 2:05pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384 "2023-02-24T14:05:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernardo\_Ramalho](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/bernardo_ramalho/32/92_2.png) [@Bernardo\_Ramalho](https://openfhe.discourse.group/u/Bernardo_Ramalho)\
**Post date:** [February 24, 2023, 2:05pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/1 "2023-02-24T14:05:05Z")

</div>

Hello,

I’m using OpenFHE in a google cloud Ubuntu VM (using Ubuntu, 22.04 LTS Pro Server, amd64 jammy pro).

I’m having a problem trying to run my project with openFHE. I’m following the [“Build User Applications”](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/building_user_applications.html) section in the documentation, but when I run “make” (in step 8) the compiler can’t find the “openfhe.h” file nor the “lbcrypto” namespace. I think it is probably due me not installing OpenFHE in the correct directory.

My question is if I’m supposed to specify my project folder when running “make install” in step 6 of “[Installing OpenFHE on Linux](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/linux.html)”. I only ran “make install” when I did it.

My project has one file, which has the code I copied from _“openfhe-development/src/pke/exampls/simple-integers.cpp”_.

Thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)\
**Post date:** [February 24, 2023, 3:13pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/2 "2023-02-24T15:13:13Z")

</div>

> My question is if I’m supposed to specify my project folder when running “make install” in step 6 of “[Installing OpenFHE on Linux](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/installation/linux.html)”. I only ran “make install” when I did it.

Did you specify a custom path when running `cmake` like in the following `cmake -DCMAKE_INSTALL_PREFIX=/your/path` ?

* * *

To make debugging this easier can you post a step-by-step of what commands you ran? e.g.

```auto
mkdir build && cd build
.... # Your instructions below

```

Thanks!

---

<div class="post-metadata">

**Author:** ![Bernardo\_Ramalho](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/bernardo_ramalho/32/92_2.png) [@Bernardo\_Ramalho](https://openfhe.discourse.group/u/Bernardo_Ramalho)\
**Post date:** [February 24, 2023, 3:56pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/3 "2023-02-24T15:56:19Z")

</div>

> [@iquah](#):
>
> Did you specify a custom path when running `cmake` like in the following `cmake -DCMAKE_INSTALL_PREFIX=/your/path` ?

No, I didn’t specify anything. I just ran `cmake ..`.

> [@iquah](#):
>
> To make debugging this easier can you post a step-by-step of what commands you ran? e.g.

After going through everything in the “Installing OpenFHE on Linux”, I ran every step in the “Building User Application” section.

I created a folder for my project and copied the “_CMakeLists.User.txt_” into the folder and switched the name to “_CMakeLists.txt_”. I then created a .cpp file with this command `touch openfhe-test.cpp`. I then copied the content of the “_openfhe-development/src/pke/exampls/simple-integers.cpp_” file into it.

I opened the “_CMakeLists.txt_” file via `cat` and added to it `add_executable( fhe-demo openfhe-test.cpp)`. I then did `mkdir build && cd build` and finally I did `cmake ..`. When I then tried to run `make`, all error appeared.

I hope this helped!

---

<div class="post-metadata">

**Author:** ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)\
**Post date:** [February 24, 2023, 3:59pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/4 "2023-02-24T15:59:52Z")

</div>

> I created a folder for my project and copied the “_CMakeLists.User.txt_” into the folder and switched the name to “_CMakeLists.txt_”. I then created a .cpp file with this command `touch openfhe-test.cpp`. I then copied the content of the “_openfhe-development/src/pke/exampls/simple-integers.cpp_” file into it.  
> I opened the “_CMakeLists.txt_” file via `cat` and added to it `add_executable( fhe-demo openfhe-test.cpp)`. I then did `mkdir build && cd build` and finally I did `cmake ..`. When I then tried to run `make`, all error appeared.

I meant with regards to OpenFHE. I just want to establish that you’ve actually got OpenFHE installed in a way that your applications can find it.

So you didn’t specify an install location. Did you install OpenFHE with `sudo make install`? You ran

```auto
mkdir build && cd build
cmake ..
make # or make -j X to use more cores
make install

```

?

---

<div class="post-metadata">

**Author:** ![Bernardo\_Ramalho](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/bernardo_ramalho/32/92_2.png) [@Bernardo\_Ramalho](https://openfhe.discourse.group/u/Bernardo_Ramalho)\
**Post date:** [February 24, 2023, 6:38pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/5 "2023-02-24T18:38:00Z")

</div>

> [@iquah](#):
>
> So you didn’t specify an install location. Did you install OpenFHE with `sudo make install`? You ran
> 
> ```auto
> mkdir build && cd build
> cmake ..
> make # or make -j X to use more cores
> make install
> 
> ```
> 
> ?

Yes, exactly. I then ran `make testall` with no errors.

---

<div class="post-metadata">

**Author:** ![iquah](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/iquah/32/8_2.png) [@iquah](https://openfhe.discourse.group/u/iquah)\
**Post date:** [February 24, 2023, 7:12pm UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/6 "2023-02-24T19:12:14Z")

</div>

Well, that doesn’t really make sense to me then 😕 I think that the `cmake ..` defaults to installing the package in `/usr` space, which means you hsould have needed `sudo make install`, not `make install`. If you try `sudo make install` and try to build your application does it work?

---

<div class="post-metadata">

**Author:** ![Bernardo\_Ramalho](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/bernardo_ramalho/32/92_2.png) [@Bernardo\_Ramalho](https://openfhe.discourse.group/u/Bernardo_Ramalho)\
**Post date:** [February 27, 2023, 10:55am UTC](https://openfhe.discourse.group/t/make-cant-find-header-nor-namespaces/384/7 "2023-02-27T10:55:26Z")

</div>

So I reinstalled today and when I ran my program it worked 🤷‍♂️ . I think it was me not running `sudo make install`.

Thanks a lot 😃
