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

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.

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.

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

mkdir build
cd build
cmake ..
make install

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

1 Like

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?

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 …

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

Can you confirm if you have followed the steps below?
And make sure you used the CMakeFile.txt here.

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.

I tried following the steps at Building User Applications — OpenFHE documentation, but got this error. I think I have installed the OpenFHE package correctly.

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.

Here is my CMakeLists.txt file.

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?

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.

1 Like

Thank you so much for your help.