microsoft / openssl

A cross-platform cryptographic library
133 stars 57 forks source link

Errors while compiling with RS4 (10.0.17134.0) Windows SDK #59

Closed MouriNaruto closed 6 years ago

MouriNaruto commented 6 years ago

C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt\stdlib.h(1191): error C2375: “winrt_getenv”: redefinition; different linkage

I tried my best to fix it but I found I can't fix that. So I need some help about that.

If someone addressed the error, I suggest next step of this project is adding the Windows 10 ARM64 support.

@khouzam

Mouri

MouriNaruto commented 6 years ago

Also I think we should keep the compatibility for earlier version of Windows, even compiled with the latest SDK.

Because some developers like me need to support several versions of Windows 10.

khouzam commented 6 years ago

Hi @MouriNaruto

Thanks for reporting the issue. I'll take a look and see what we can do.

Building with a new SDK still allows the binary to run on previous versions of Windows, so moving forward with the progress of the SDK doesn't prevent supporting older versions.

khouzam commented 6 years ago

Hi @MouriNaruto

I've pushed a fix 5cc1e25bc76 for the issue on the OpenSSL_1_0_2_WinRT-stable branch.

I have also created a pull request #60 for adding ARM64 support. Please try the OpenSSL_1_0_2_WinRT-stable_ARM64 branch for the changes.

Everything seems to work fine and the tests ran to completion on an ARM64 device.

MouriNaruto commented 6 years ago

@khouzam

Thank you, but I want to talk something.

Building with a new SDK still allows the binary to run on previous versions of Windows, so moving forward with the progress of the SDK doesn't prevent supporting older versions.

But after reading the source code, I realized that some functions will be linked to the new version of dynamic libraries if I am using the new version of Windows SDK because you used the conditional compilation. (It will not overwrite functions not supported by older versions if the new version of Windows SDK is used.)

Mouri

khouzam commented 6 years ago

Hi @MouriNaruto

Yes, while when using a new SDK we might be linking around newly exposed functions (specifically the ones that we override), they are already part of the previous versions of the OS. The apis weren't exposed in the Universal SDK and would fail the WACK certification, but as the SDK and WACK allow for more functions to be used they are also allowed on previous versions of the OS.

MouriNaruto commented 6 years ago

@khouzam OK. Thank you very much.