2017-07-31 84 views
0

我有以下的OpenSSL代碼:BIO_set_fp()崩潰在Windows

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 

在程序,錯誤爲0x1存在行BIO_set_fp(out, stdout, BIO_NOCLOSE);

我使用Visual Studio 2015年在Windows 10

回答

0

我解決它通過改變標誌:

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