Wheatley
Wheatley

Reputation: 153

BIO_set_fp() crashes on Windows

I have the following OpenSSL code:

BIO* out = BIO_new(BIO_s_file()); // BIO_new_fp(stdout, BIO_NOCLOSE);
if (out == NULL) {
    CNGerr(CNG_F_CNG_CTRL, CNG_R_FILE_OPEN_ERROR);
    return 0;
}
BIO_set_fp(out, stdout, BIO_NOCLOSE); // Program exits with code 0x1 here

On the line BIO_set_fp(out, stdout, BIO_NOCLOSE); the program exists with error 0x1.

I am using Visual Studio 2015 on Windows 10.

Upvotes: 0

Views: 649

Answers (1)

Wheatley
Wheatley

Reputation: 153

I solved it by changing the flag in:

Properties > C/C++ > Code Generation > Runtime Library: Multi-threaded DLL /MD

Upvotes: 1

Related Questions