Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.

sgx_ukey_exchange.lib(ukey_exchange.obj) : error LNK2001: unresolved external symbol __imp___invalid_parameter_noinfo

Veawor_L_
Beginner
755 Views

Hi,

I'm upgrading my SGX SDK from 1.6 to 1.7.100.35600, 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.

Thank you!
Veawor

0 Kudos
5 Replies
Francisco_C_Intel
755 Views

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.

 

0 Kudos
Veawor_L_
Beginner
755 Views

@Francisco
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?

0 Kudos
Francisco_C_Intel
755 Views

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?

0 Kudos
Veawor_L_
Beginner
755 Views

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.

0 Kudos
Veawor_L_
Beginner
755 Views

I can confirm that this issue disappeared after updating to VC2015. It looks like the SDK is not backward compatible with VC2012.

0 Kudos
Reply