Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compile error using openssl

I try to use openSSL on a app but I get a parse issue on the following line (in the rsa.h header file)

int (*rsa_mod_exp)(BIGNUM *r0,const BIGNUM *I,RSA *rsa,BN_CTX *ctx); 

error is : parse error expected ')'

Using XCode 5 on OSX 10.9 and openssl-1.0.1e

What can be the issue?

Thanks for your help.

like image 680
AP. Avatar asked Mar 23 '14 14:03

AP.


2 Answers

For anyone who sees this in the future, it's an amazingly simple solution: on the line quoted in the question, just change BIGNUM *I to BIGNUM *i. (That is, change the capital "I" to lowercase "i".)

Recompile, and everything should work! I have no idea why that works, but I trusted the interwebs and once again my faith was rewarded.

like image 170
Nerrolken Avatar answered Oct 22 '22 01:10

Nerrolken


It could be all sorts of things, either in the header or in the file before the point the header is included. If by looking at the region of source around the point it is not obvious you can try preprocessing the file.

In Xcode select Product -> Perform Action -> Preprocess "file" and you'll get an editor window containing the source the compiler actually sees after file inclusion and macro expansion. In that locate the point of the error, look around, and work backwards if needed, untill you spot the problem.

like image 43
CRD Avatar answered Oct 22 '22 02:10

CRD