libOPENFHEpke.dll not found in directory

Hello OpenFHE Team,

I am getting the following error when trying to execute my code on Windows.

xxxxx@xxx MINGW64 ~/OneDrive/Documents/FHE123/build
$ ./simpleinteger.exe
C:/Users/xxxxx/XXXX/Documents/FHE123/build/simpleinteger.exe: error while loading shared libraries: libOPENFHEpke.dll: cannot open shared object file: No such file or directory

I copied libOPENFHEpke.dll to the ‘lib’ folder in C:\home\xxxxx\build\lib but the problem persists.

I am using VSCode, and ran the following to arrive at this point
mkdir build
cd build/
cmake …
cmake --build . [At this point the libOPENFHEpke.dll.a and libOPENFHEpke.dll were
not in the lib folder, so I copied the files there.]
./simpleinteger.exe

I would appreciate your help because I have searched a lot of online materials but could not find any solution.

I have never worked with OpenFHE on native Windows, but I think you need to add the OpenFHE DLLs directory to the PATH environment variable.
Try doing that in windows GUI, or you can try this command line:

setx PATH “%PATH%;C:\path\to\your\openfhe\dll\directory”

Thank you so much. It worked.