Cross-platfom compiling issue

How can I compile this repo in Visual Studio 2022 IDE?

Are you asking about using Visual Studio IDE using WSL? Then you might find this article useful: https://learn.microsoft.com/en-us/cpp/build/walkthrough-build-debug-wsl2?view=msvc-170

You can also configure Visual Studio to use the MinGW compiler (native g++ in Windows).

If you are asking about using the Visual C++ compiler, then it may be trickier than the two options mentioned above (we have not tested it for the current version).

I’m asking Visual Studio IDE under Windows OS. I’d like to debug all the codes that you provided.
If it’s not possible with VS yet, could you offer something else to debug it?

As I pointed out previously, there are two components: Visual Studio IDE and compiler. For WSL (native Linux g++) and MinGW (native Windows g++), one can set up Visual Studio IDE for OpenFHE. In fact, some developers of OpenFHE are using this setup. For the Visual C++ compiler (third option), this is more challenging. In summary, you can use VS.

Another option is Eclipse (what I am using, for example).

If you still have questions on setting up the VS, please let us know which compiler you are using, and I will ask someone using the setup to describe the steps in more detail.

Thanks for your help. I’m using Visual Studio 2022 IDE. I cloned repo directly in it. Then tried to compile it but get some .dll error, try to cmake it but got some Ninja error. Unfortunately failed with.
If you guide me how do I compile and debug those .cpp files it would be great for me…

Dear Professor Yuriy Polyakov. Is my question above still in progress?

I’ve asked @dsuponitskiy-duality to reply to this thread. I am personally using eclipse and gdb for debugging. My understanding is that most of the OpenFHE developers working in VS IDE use it as an editor and work with command-line tools for compiling (like cmake, make) and gdb or similar tools for debugging.

This documentation page may also be helpful: Setting up your Editor — OpenFHE documentation It was written by one of the members of the OpenFHE community.

1 Like

@bbyclub Hello, I don’t personally know anyone who uses Visual Studio for linking or debugging OpenFHE. Given its complexity, setting it up with Visual Studio might not be straightforward, if possible at all. OpenFHE wasn’t initially designed to run on Visual Studio. However, configuring VS Code for debugging the library might be a viable option.