Wayne,
I do not know anything about Diffie-Hellmann.
Never used it. Might want to ask the list instead.
If you use .cpp, don't forget to wrap your C stuff in
#ifdef __cplusplus
extern "C" {
#endif "
/* Your stuff */
#ifdef __cplusplus
}
#endif "
Otherwise you will get undefined externals at linking time,
since C fct translations are different from CPP fct translations.
> But when I deleted libeay.dll from the project but add in libeay.lib
and
> then compile and build exe, no problem at all. Why?
The .LIB is the _import_library_ which tells other DLLs and EXEs about
the
definitions contained in the .DLL file. Don't include the DLL file in
your
project, instead include the LIB file.
> If I ask silly question, just forgive me, :)
There are only silly answers, no silly questions (or people that
might not have any time to answer) (Well, up to a certain point.
I once had a guy ask me how to use printf() while he was trying to
debug a ISAPI DLL for IIS4 <groan>.)
Cheers!
Ulrich
---Ng Wei Yang <[EMAIL PROTECTED]> wrote:
>
> Dear Ulrich,
>
> It is me again. Sorry that I'm so dumb and need to bother you again.
>
> I want to use the Diffie-Hellman routines provided with the OpenSSL.
> However, I can't find a related documentation about the various
> Diffie-Hellman routines in the "openssl-0.9.1c\doc" directory. Any
idea
> where I can find it?
>
> The other strange thing is as below:
> I'm using Microsoft Visual C++ 5 (Microsoft Developer Studio 97).
> I create a workspace and a cpp file named diffie.cpp. Inside this
file I
> include dh.h (#include "dh.h"). I also add libeay.dll to the
project. Then
> I try to access the various Diffie-Hellman routines like
> DH_generate_parameters. When I compile diffie.cpp, no problem. But
when I
> try to build exe, problem as below:
>
> --------------------Configuration: hyperpkcs11 - Win32
> Debug--------------------
> Linking...
> diffie.obj : error LNK2001: unresolved external symbol
> _DH_generate_parameters
> Debug/hyperpkcs11.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
>
> hyperpkcs11.exe - 2 error(s), 0 warning(s)
>
> But when I deleted libeay.dll from the project but add in libeay.lib
and
> then compile and build exe, no problem at all. Why?
>
> If I ask silly question, just forgive me, :)
>
> Thanks!
>
> Regards,
> Wayne
>
>
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]