# Where we have exactly run "make" and "make install" commands?

**URL:** <https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220>\
**Category:** Library Questions\
**Created:** [April 22, 2024, 3:39pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220 "2024-04-22T15:39:38Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:39pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/1 "2024-04-22T15:39:38Z")

</div>

I have tried to install it on Windows 11 via msys2. I’m using MSYS2, MINGW64\_NT-10.0-22631 version 3.4.10.x86\_64 (runneradmin@fv-az1105-326) (gcc version 13.2.0 (GCC) ) .  
I am unable to run "make’ and “make install” commands by following the steps mentioned at URL-[https://openfhedevelopment.readthedocs.io/en/latest/sphinx\_rsts/intro/installation/windows.html](https://openfhedevelopment.readthedocs.io/en/latest/sphinx_rsts/intro/installation/windows.html).

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:43pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/2 "2024-04-22T15:43:51Z")

</div>

![fhe1](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/c8fb8e2544b0ca2e9170ccfed42aca190dc812b5.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:46pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/3 "2024-04-22T15:46:21Z")

</div>

![fhe2](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/002c3e62d1eb875747ef215450baa4adeb574b12.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:46pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/4 "2024-04-22T15:46:57Z")

</div>

![fhe3](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/29642f7a3d13df49671693315bd418560f171643.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:48pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/5 "2024-04-22T15:48:05Z")

</div>

![fhe4](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/667724e1229df7e872a06780b6a283bec2b4d0df.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:49pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/6 "2024-04-22T15:49:58Z")

</div>

![fhe5](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/eb8bf5b188ed5ef614f237b22a94d73b5c426959.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 3:51pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/7 "2024-04-22T15:51:21Z")

</div>

In the above snapshots, where did I go wrong? How to run “make” and “make install” commands properly? Where should I run exactly? Please help me.

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [April 22, 2024, 4:07pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/8 "2024-04-22T16:07:31Z")

</div>

From within the `openfhe-development` directory, run the following commands (one by one) in your terminal

```auto
mkdir build
cd build
cmake ..
make
make install

```

Also make sure you have gcc installed, you can check that by running:  
`gcc --version`

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 5:27pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/9 "2024-04-22T17:27:18Z")

</div>

Thank you, sir. It ran. How can I run my “mycode.cpp(my local coded file)” file? I mean where can I create a new myproject directory? How to proceed? How to compile my code?

 ![fhe6](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/e336e146a2b424cdb49964e5f9e44ecb1ef39ae5.jpeg)

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 22, 2024, 5:44pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/10 "2024-04-22T17:44:21Z")

</div>

I tried to create a myproject folder inside the openfhe-development directory & copied CMakeLists.User.txt & pasted it inside “myproject” folder with renamed it as CMakeLists.txt.  
mkdir build  
cd build  
cmake …  
make

But got some error. Did I follow the steps correctly?

 ![fhe7](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/c169e8dbe47a6210512f952251a74144c0d2b82c.jpeg)

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [April 22, 2024, 7:43pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/11 "2024-04-22T19:43:23Z")

</div>

Can you confirm if you have followed the steps below?  
[https://openfhe-development.readthedocs.io/en/latest/sphinx\_rsts/intro/building\_user\_applications.html](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/building_user_applications.html)  
And make sure you used the CMakeFile.txt [here](https://github.com/openfheorg/openfhe-development/blob/main/CMakeLists.User.txt).

There is no need to create your application from within OpenFHE, it is actually better to create it outside OpenFHE and just link to the relevant paths to the installed OpenFHE library.

I recommend reading some tutorials on building and linking C++ applications in Uinux-like environments.

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 23, 2024, 4:01pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/12 "2024-04-23T16:01:10Z")

</div>

![image](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/8465d168023a87f04148b57249028c5226e9ee16.png)  
I tried following the steps at [Building User Applications — OpenFHE documentation](https://openfhe-development.readthedocs.io/en/latest/sphinx_rsts/intro/building_user_applications.html), but got this error. I think I have installed the OpenFHE package correctly.

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [April 23, 2024, 8:52pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/13 "2024-04-23T20:52:03Z")

</div>

Firstly, were you able to run any of the examples provided with OpenFHE, such as the simple integers example located at `bin/examples/pke/simple-integers`?

Secondly, why are you using an absolute path to include OpenFHE, as shown in your screenshot `#include "C:\Program Files (x86)\OpenFHE\include\openfhe"`? Here you have at least one problem since you are trying to include a directory. In C++ you can include files, not directories, and you should specify the file extension.  
You can use instead `#include "openfhe.h"` in your user application. This should work if you have installed OpenFHE correctly.

If this does not work for you, do provide your `CMakeLists.txt file` so we can help you better.

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 24, 2024, 3:29am UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/14 "2024-04-24T03:29:08Z")

</div>

![image](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/32edb8bd970e6eabaff618defc82c38ca0eef780.png)  
Here is my CMakeLists.txt file.  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/openfhe/original/1X/a4fc74a321a903aa47130807938d6e482dbd2834.png)  
I think I have built my executable file successfully. However, I didn’t get the desired output of my code while running executable files. Am I right?

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [April 24, 2024, 1:14pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/15 "2024-04-24T13:14:35Z")

</div>

Please submit any further questions in a separate thread. This thread’s scope has been completed now as you are able to build and run your code.

---

<div class="post-metadata">

**Author:** ![Jason](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jason](https://openfhe.discourse.group/u/Jason)\
**Post date:** [April 24, 2024, 2:04pm UTC](https://openfhe.discourse.group/t/where-we-have-exactly-run-make-and-make-install-commands/1220/16 "2024-04-24T14:04:27Z")

</div>

Thank you so much for your help.
