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

compile errors #4

Open
hazybluedot opened this issue Dec 16, 2013 · 4 comments
Open

compile errors #4

hazybluedot opened this issue Dec 16, 2013 · 4 comments

Comments

@hazybluedot
Copy link

After I install hashlib++ as a static library, when I run make I get a bunch of error, starting with

RSAcrypt.cpp: In member function ‘void RSAcrypt::genKeys()’:
RSAcrypt.cpp:179:17: error: ‘generatePrime’ was not declared in this scope  
   generatePrime(x);
RSAcrypt.cpp:182:25: error: cannot convert ‘std::string {aka std::basic_string<char>}’ to ‘char*’ for argument ‘1’ to ‘char* __gmpz_get_str(char*, int, mpz_srcptr)’
  mpz_get_str(R, 10, m);

can you confirm that your Makefile works on your own system? What distribution are you running and what version of g++ are you running?

@hazybluedot
Copy link
Author

in that case it would be a good idea to work on the RSA stuff on a separate branch:

$ git checkout -b rsa_support
$ git checkout master
$ # clean up master branch to remove broken RSA support

Then the master branch will be clean and should compile and you can continue working towards RSA support on rsa_support (use git checkout to switch between branches). If your group member makes changes to the RSA code, then merge them into the rsa_support branch first and test them. If all is well, then merge rsa_support into master

@cspang1
Copy link
Owner

cspang1 commented Dec 16, 2013

I've just spoken with him and he's working on it now. Thanks for the guidance!

@ghost
Copy link

ghost commented Dec 16, 2013

Yes, my apologies on the compilation errors. I have been unable to compile the hashlib++ on my VM, and including the files separately still produces errors. Currently I have uploaded a file that does not generate compile errors for me.

@hazybluedot
Copy link
Author

I am still having problems compiling:

  • hashlib.h not found

    When I installed hashlib++ using the instructions the header files are installed to /usr/include/hashlib++ so the include line should be

    #include <hashlib++/hashlibpp.h>
    

    unless you require a non-standard install of hashlib++, in which case that should be well documented

  • numerous invalid conversion from 'const char*' to 'char' errors

    be mindful of what is declared const and what isn't. Always use const for values that should not change.

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