<div dir="ltr">Hi,<div><br></div><div>I am working on a legacy multithreaded application for Visual Studio/Windows that uses OpenSSL to handle encryption. It needs to be compiled in both debug and release modes. I've managed to port it from 1.1.1 to 3.0.8. That part was relatively simple.</div><div><br></div><div>It worked fine compiled statically with OpenSSL 1.1.1. I can get the program to compile and run correctly with the dynamic libraries in 3.0.8, but my instructions are to get it working with the static libraries for 3.0.8 instead. This is where I run into problems.</div><div><br></div><div>The original libraries included were: Comctl32.lib, libssl.lib, libcrypto.lib, ws2_32.lib, crypt32.lib</div><div><br></div><div>I've switched libcrypto.lib to libcrypto_static.lib and added GDI32.LIB, ADVAPI32.LIB, USER32.LIB as per the INSTALL document.</div><div><br></div><div>This generates a whole series of warnings and errors. I've only included the first few of each.</div><div><br></div><div>warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification<br>warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library<br></div><div>LINK : warning LNK4217: symbol '__time32' defined in 'libucrtd.lib(time.obj)' is imported by 'libcrypto_static.lib(libcrypto-lib-http_client.obj)' in function '_OSSL_HTTP_REQ_CTX_set_request_line'<br>LINK : warning LNK4286: symbol '__time32' defined in 'libucrtd.lib(time.obj)' is imported by 'libcrypto_static.lib(libcrypto-lib-bss_conn.obj)'<br>LINK : warning LNK4286: symbol '__time32' defined in 'libucrtd.lib(time.obj)' is imported by 'libcrypto_static.lib(libdefault-lib-drbg.obj)'<br>LINK : warning LNK4217: symbol '__time32' defined in 'libucrtd.lib(time.obj)' is imported by 'libcrypto_static.lib(libcrypto-lib-bio_lib.obj)' in function '_BIO_do_connect_retry'<br></div><div><br></div><div>(and a whole lot of further warnings, followed by)</div><div><br></div><div>libcrypto_static.lib(libcrypto-lib-params_from_text.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br>libcrypto_static.lib(libcrypto-lib-dso_win32.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br>libcrypto_static.lib(libcrypto-lib-asn1_lib.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br>libcrypto_static.lib(libcrypto-lib-ctrl_params_translate.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br>libcrypto_static.lib(libcrypto-lib-x509_obj.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br>libcrypto_static.lib(libcrypto-lib-evp_key.obj) : error LNK2001: unresolved external symbol __imp__strncpy<br></div><div><br></div><div>(and a whole series of further link errors)</div><div><br></div><div>It seems obvious enough that the warnings and errors are part and parcel of the same problem, that I'm using the incorrect additional libraries for the type of build I'm trying to do.</div><div><br></div><div>The problem, then, is what extra libraries should I be including to work with this application, given the errors I am getting and given that everything needs to be safe for multithreading.</div><div><br></div><div>Any help would be gratefully received.</div><div><br></div><div>Jonathan Day</div><div><br></div></div>