Dennis B. wrote:
>
> Hello,
>
> if this is the wrong place for my kind of problem/question,
> please excuse me.
>
> I am develloping using openssl both under Linux and NT. Under Linux,
> everything works fine, as expected ;-). The NT portion although compiles
> well, but that's nearly all:
>
> -If I use any of the <stdio.h> functions with stdout, stdin or stderr as
> parameter,
> e.g. fprintf( stdout, "foo" ) within my programm, it hangs( openssl built
> with VC4.0 ) or crashes ( VC5.0 ).
> -If I use C++ with openssl, the program hangs(VC4.0) or crashes(VC5.0).
> -If I use the .dll-version, the program hangs or crashes.
>
> "The program" could be for example:
>
> //ignore missing headers
>
> void main()
> {
> RSA *key = RSA_new();
> fprintf( stdout, "foo\n" );
> }
>
> Well, not complicated at all ... but enough to hang/crash. The behaviour
> described above can't be normal under Win32, as it makes the lib nearly
> useless .. !?
>
This is normal for Win32 if you try to mix runtime libraries. OpenSSL is
by default linked with the multithreaded DLL version of the libraries if
you don't do the same in your program the conflicts will cause a crash.
You need to use the multithreaded DLL runtime library option (/MD
option) and all should work. This is documented in the older stuff at
the end of INSTALL.W32.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]