Naren
Naren

Reputation: 31

is it possible to create a dll with /MT flag? if yes how to create OpenSSL dlls with /MT flags in windows

We have an application built with /MT flag currently we are upgrading our application from another SSL to OpenSSL. OpenSSL by default built with /MD flag but my application build with /MT so application crashes in OpenSSL. is it possible to create a dll with /MT flag, if yes then how to create OpenSSL shared libraries with /MT flag?

Upvotes: 0

Views: 947

Answers (2)

David Dantoni
David Dantoni

Reputation: 1

I found out a solution that seems to works and compile openssl dlls without needs of VC Redistribuables.

For that, call :

perl Configure VC-WIN64A "--prefix=openssl-1.1.1" --release 
or 
perl Configure VC-WIN32 "--prefix=openssl-1.1.1" --release

Then replace in the created makefile

/MD per /MT (in CNF_CFLAGS param)
/debug per /release (in LDFLAGS param)

Upvotes: 0

Shane Powell
Shane Powell

Reputation: 14158

You can use the -static option to the opensll configure script. That will create static libraries using /MT you can link to (i.e. no dll's).

If you are using pre-built libraries you will have to switch to compiling openssl yourself.

You need to follow the INSTALL / NOTES.WIN instructions for the openssl compiling requirements.

Your configure setup could look something like:

perl Configure VC-WIN32 --prefix="myinstalldir" -static --release

Upvotes: 1

Related Questions