Fail when trying to build my own .cpp code


I’m trying to run a simple demo code provided by OpenFHE under my own folder, which my folder path is:


and both CMakeLists.txt and demo-simple-example.cpp are in \my_project folder, I already modify executable in CMakeLists.txt into:

add_executable( test demo-simple-example.cpp )

After doing this I enter the folder and follow the commands from Github:

$  mkdir build
$  cd build
$  cmake ..
$  make

However, there’s no makefile generated after cmake .. command so terminal shows following message:

user@xtze5yz MINGW64 ~/openfhe-development/my_project/build
# cmake ../
-- Configuring done
-- Generating done
-- Build files have been written to: C:/msys64/home/user/openfhe-development/my_project/build

user@xtze5yz MINGW64 ~/openfhe-development/my_project/build
# make
make: *** No targets specified and no makefile found.  Stop.

I’m wondering where will this makefile be generated and how could I fix this problem. Do I miss antyhing?

I’ve completed make testall after building the library in C:\msys64\home\user\openfhe-development\build\ folder and it doesn’t show any errors.


Have you followed the instructions here: Building User Applications

Thanks! I didn’t copy the PreLoad.cmake file, after doing this it works perfectly!

1 Like