It is very clear that you Thomas have never ever used the hmac routines !! So how you entertain yourself is irrelevant to the problem being discussed. thank you. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Thomas J. Hruska Sent: Tuesday, September 11, 2007 3:38 PM To: openssl-users@openssl.org Subject: Re: C++ compatability
Saju Paul wrote: > 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 While I'm finding this discussion on misinformation entertaining, I realize Justin probably has a job to do. In general, all you ever need to include is: #include <openssl/ssl.h> #include <openssl/err.h> After your other #include files. Those will generally #include any other files you might need...including the HMAC routines. I've never had any issues with VC++ or gcc/g++ when doing that. -- Thomas Hruska Shining Light Productions Home of BMP2AVI, Nuclear Vision, ProtoNova, and Win32 OpenSSL. http://www.slproweb.com/ ______________________________________________________________________ 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]