first: the extern "C" around the hmac.h is not necessary. get rid of it.
second: the errors are make no sense at all; these header files you are
referencing are Unix/Linux files are they not ? meaning they are not files
built in a Windows environment (i hope not)
third: a rebuild of openssl is something that I might try next.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phillips, Justin -
ACD
Sent: Wednesday, September 12, 2007 9:07 AM
To: openssl-users@openssl.org
Subject: RE: C++ compatability


The error is on the header file asn1.h.  I have commented out the call
to HMAC so the only related code is the include which at this point
looks like.

extern "C" {
    #include <openssl/hmac.h>
}

Here is the error...

In file included from
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/objects.h:9
60,
                 from
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/evp.h:94,
                 from
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/hmac.h:67,
                 from StateFill.cpp:36:
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:905:
invalid
   conversion from `void (*)()' to `void*'
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:915:
invalid
   conversion from `void (*)()' to `void*'
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:920:
invalid
   conversion from `void (*)()' to `void*'
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:933:
invalid
   conversion from `void (*)()' to `void*'
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:938:
invalid
   conversion from `void (*)()' to `void*'
/opt/hardhat/devkit/arm/xscale_le/target/usr/include/openssl/asn1.h:985:
invalid
   conversion from `void (*)()' to `void*'


I also notice warnings that are related to these same lines...

/opt/hardhat/devkit/arm/xscale_le/target/usr/include/c++/3.2.1/bits/stl_
queue.h: At
   top level:
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:905
: warning: `
   void*__ASN1_dup' defined but not used
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:915
: warning: `
   void*__ASN1_d2i_fp' defined but not used
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:920
: warning: `
   void*__ASN1_i2d_fp' defined but not used
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:933
: warning: `
   void*__ASN1_d2i_bio' defined but not used
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:938
: warning: `
   void*__ASN1_i2d_bio' defined but not used
/opt/hardhat/devkit/arm/xscale_le/target2/usr/include/openssl/asn1.h:985
: warning: `
   void*__ASN1_pack_string' defined but not used


When I remove the include to openssl/hmac.h I can compile successfully.
I am wondering if there is a patch that I need to install to remove
these lines from the header file?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Saju Paul
Sent: Tuesday, September 11, 2007 3:23 PM
To: openssl-users@openssl.org
Subject: RE: C++ compatability

is the compile error on the header file (asn1.h) or at the call ?
copy and paste the error include any necessary code.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phillips, Justin -
ACD
Sent: Tuesday, September 11, 2007 2:55 PM
To: openssl-users@openssl.org
Subject: RE: C++ compatability


I have the following code but I still get the compile errors described
below.  There are no other openssl includes or function calls other than
what is shown below.

extern "C" {
   #include <openssl/hmac.h>
}


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Saju Paul
Sent: Tuesday, September 11, 2007 2:37 PM
To: openssl-users@openssl.org
Subject: RE: C++ compatability

extern "C" {
   // defn...
}

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phillips, Justin -
ACD
Sent: Tuesday, September 11, 2007 2:20 PM
To: openssl-users@openssl.org
Subject: C++ compatability



 I am trying to call the HMAC function (openssl 0.9.8e) within my C++
code.  When I include <openssl/hmac.h> I get compilation errors on the
asn1.h file at lines 905, 915, 920, 933, 938, and 985 all saying
"invalid conversion from 'void (*)() to 'void*'.  This makes sense
because the libraries are compiled with gcc but I am compiling my
software with g++ and in C++ this type of casting is not allowed.  So my
question is how do you use openssl in C++ when the include files use C
specific syntax such as this?  Thank you in advance for the help.

Justin
*****************************************************************
This e-mail and any files transmitted with it may be proprietary and are
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this e-mail in error please notify the
sender. Please note that any views or opinions presented in this e-mail
are solely those of the author and do not necessarily represent those of
ITT Corporation. The recipient should check this e-mail and any
attachments for the presence of viruses. ITT accepts no liability for
any damage caused by any virus transmitted by this e-mail.
*******************************************************************
 ______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]
*****************************************************************
This e-mail and any files transmitted with it may be proprietary and are
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this e-mail in error please notify the
sender. Please note that any views or opinions presented in this e-mail
are solely those of the author and do not necessarily represent those of
ITT Corporation. The recipient should check this e-mail and any
attachments for the presence of viruses. ITT accepts no liability for
any damage caused by any virus transmitted by this e-mail.
*******************************************************************
 ______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]
*****************************************************************
This e-mail and any files transmitted with it may be proprietary
and are intended solely for the use of the individual or entity to
whom they are addressed. If you have received this e-mail in
error please notify the sender. Please note that any views or
opinions presented in this e-mail are solely those of the author
and do not necessarily represent those of ITT Corporation. The
recipient should check this e-mail and any attachments for the
presence of viruses. ITT accepts no liability for any damage
caused by any virus transmitted by this e-mail.
*******************************************************************
 ______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to