Hi there,

At 01:49 PM 3/23/00 +0000, you wrote:
>Bob Ollila wrote:
>> 
>> Steve, thanks for your help, but I think I need a little more
detail/clarification.  The standard build of openssl includes the /MD flag,
so I assume that the libs that were built were the multithreaded libs?
Does my application need to specify this same option when compiling? - or
when linking?  What else do I need to do ?
>> 
>
>As mentioned in INSTALL.W32 your applications need to use the same
>runtime library option otherwise there is a library conflict and things
>crash rather quickly. 
>
>AFAIK (and I'm no VC++ expert) theres some stuff put in object files too
>so you need to include the option for compiling and linking.
>
>Under VC++ its project->settings->C/C++->(category)Code Generation->Use
>runtime library which should be set to "multi threaded DLL".
>
>BTW does anyone know an alternative way of handling things? Is it normal
>for libraries to always have to use the same runtime library so you
>might need up to six version of the same library with all the relevant
>runtime library combinations?

I've just ran a test for my own peace of mind with this ... I failed
completely to get OpenSSL to build in DLL form using something other than
/MD (which is what specifies that the MSVCRT run-time is to be used).
However, the static form (nt.mak rather than ntdll.mak) built just fine ...
all I had to do was to run the usual steps but make a quick edit before
building, namely;

perl Configure VC-WIN32
ms\do_ms (whether this continues to work with do_nasm or do_masm, I don't
know)
nmake -f ms\nt.mak

Before the last step (the "nmake" call), edit ms\nt.mak and change the
"/MD" flag in "CFLAGS" to "/MT" (this will use libcmt.lib rather than
msvcrt.lib) and add "/defaultlib:libcmt.lib" to the "LFLAGS" definition.

Now building ms\nt.mak should run to completion and pass the tests. As this
one is built with libcmt.lib, it should link and cooperate with any other
code that is build with that. I haven't tried libc.lib (not multi-threaded)
but I'd hope it's much the same.

To work out what your current code is building with (regarding C libraries
... find wherever the compiler settings are (in Visual Studio this should
be under Project->settings->... as per Steve's note above). If you're
building from the commandline you should see the /M* flag operating as your
project builds ... you need to use the same libc library in OpenSSL as with
your own project (with the exception that debug versions and release
version might just co-operate enough to work with only a couple of linker
warnings).

NB: There may well be an easier way of specifying this stuff from the
configuration script, a la;
  perl Configure <options-here-perhaps?> VC-WIN32

but I have no idea ... I've tried to avoid the win32 build process as much
as I can get away with.

Cheers,
Geoff


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to