Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make install? #201

Open
rbharath opened this issue May 16, 2018 · 2 comments
Open

make install? #201

rbharath opened this issue May 16, 2018 · 2 comments

Comments

@rbharath
Copy link

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 as Program.cpp) and compiling with the make 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.

@fionser
Copy link
Contributor

fionser commented May 17, 2018

  1. basically, we just place the built fhe.a in the link path, e.g., /usr/lib and /usr/local/lib,
    and place the header files in the include path.
  2. or you can set these paths in your makefile with -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 

@rbharath
Copy link
Author

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants