HElib icon indicating copy to clipboard operation
HElib copied to clipboard

Error when I g++ the helib_example.cpp

Open MikeDSH opened this issue 6 years ago • 3 comments

I have done it according to the install.md.But when i try to test it there is a bug.

helib_example.cpp:3:10: fatal error: helib/FHE.h: No such file or directory #include <helib/FHE.h> ^~~~~~~~~~~~~ compilation terminated.

MikeDSH avatar Mar 28 '19 07:03 MikeDSH

Hi Mike, can you tell me how did you try to compile the file?

Consider that the helib_example project should to be compiled us using the supplied cmake script (with the arguments as described in INSTALL.md), and not directly g++.

esteffin avatar Mar 28 '19 18:03 esteffin

@esteffin ,

I also meet this error.

I built and installed HElib as INSTALL.md said.

I chose Option 1 to build and installed HElib in a folder(/root/helib_install/helib_pack).

Then, I wrote a simple code with cmake. Following is my CMakeList.txt

image

And "cmake -Dhelib_DIR=/root/helib_install/helib_pack/share/cmake/helib ." image

Everything worked well. But when I try to make, I meet this error.

image

I'm not fimilar with cmake. Generally, I use "-I" to tell compiler where's the header files. But In this case, What can I do?

QinLongFei avatar Aug 26 '20 07:08 QinLongFei

@tuliopascoal , Sorry. It's been so long. I have forgot how to fix it.

QinLongFei avatar Feb 08 '22 02:02 QinLongFei