Open rbharath opened 6 years ago
fhe.a
in the link path, e.g., /usr/lib
and /usr/local/lib
,
and place the header files in the include path.-I <include_path>
and -L <link_path>
.For example,
/home
/Alice
/SomeDir
/HElib/src <-- fhe.a and the head files are here
/OtherDir
/projectDir
/makefile
/program.cpp
Your program.cpp
can be like this
#include "FHEcontext.h"
int main() {
FHEcontext context(1024, 2, 1);
....
}
Then you can write the makefile
as
gcc -o main program.cpp -L /home/Alice/SomeDir/HElib/src -lfhe -lgmp -I /home/Alice/SomeDir/HElib
@fionser Thanks for the answer!
Would there be interest in having a make install
command added by PR to move FHE.a
and the header files to the right locations?
I've been experimenting with HELib to write a few simple programs. For now, I've been placing my code in the
src
directory (say asProgram.cpp
) and compiling with themake Program_x
command. This is fine for now, but is a little kludgy especially as I'm getting confident about trying some more complicated programs.Is there an install command already available? If not, would there be interest in adding a
make install
command to the HELib makefile? I'm glad to make a pull request if so.