On Sat, Jul 7, 2012 at 9:14 AM, Giuseppe Barbieri <elec...@gmail.com> wrote:
> I am using OpenSSL for a cuda project.
>
> I just imported all the project from win to linux (Eclipse)
>
> I solved all the dependencies except this annoying error:
>
>> Invalid arguments ' Candidates are: int BN_set_word(bignum_st *, ?) '
>
>
> for this line:
>
>     BN_set_word(two, 2);
>
> and the function itself says in the bn.h
>
>     int    BN_set_word(BIGNUM *a, BN_ULONG w);
>
> Where BN_ULONG is defined as:
>
>     #define BN_ULONG    unsigned long
>
> Neither it works if I do something like
>
>     unsigned long q = 2;
>     BN_set_word(two, q);
>
> Because it returns
>
>> Invalid arguments '
> Candidates are:
> int BN_set_word(bignum_st *, ?)
> '
>
> or
>
>     BN_ULONG q = 2;
>     BN_set_word(two, q);
>
> that gives
>
>>Type 'BN_ULONG' could not be resolved
>
> What is the problem?
Try casting 2 to BN_ULONG. I think its an int by C/C++ rules:

BN_set_word(two, (BN_ULONG)2);
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to