I'm upgrading my SGX SDK from 1.6 to 126.96.36.199600, and it fails to link to C:\Program Files (x86)\Intel\IntelSGXSDK\bin\Win32\Debug\sgx_ukey_exchange.lib with Debug Configuration. And I have to change preprocessor from _DEBUG to NDEBUG, and runtime library from /MDd to /MD to succeed to link. I'm wondering if there are some libraries in the Debug folder not be configured as a Debug configuration. Any advise is appreciated.
When you switched from 1.6 to 1.7, did you also switch from VS2013 to VS2015?
If you need to, you can add the files in the sample application, RemoteAttestation\isv_app\sample_ukey_exchange\*, instead of adding the precompiled static library.
Which precompiled static library do you mean? I thought the sample code in RemoteAttestation\isv_app\sample_ukey_exchange\* still need to link to sgx_ukey_exchange.lib. Am I missing something?
The sample code in RemoteAttestation does link against the sgx_ukey_exchange.lib static library, yes. If you are using the supported IDE, VS2015, this prebuilt static library should work.
If for some reason the prebuilt static library was built in such a way that you cannot use it directly in your project, you can instead use the source files I mentioned. Note that passing in the static library to the linker AND using the source files won't work.
Which version of Visual Studio are you using?
I'm using VC2012. I haven't tried VS2015 yet, but this issue seems not related to the VC version. It's fine to link to the C:\Program Files (x86)\Intel\IntelSGXSDK\bin\Win32\Release\sgx_ukey_exchange.lib with Release Configuration. The issue only happens when project link to C:\Program Files (x86)\Intel\IntelSGXSDK\bin\Win32\Debug\sgx_ukey_exchange.lib with Debug Configuration.
I'll try VS2015 later and see if this issue happens.