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

It is not possible to include Python.h header file inside enclave


I need to include the Python.h header file inside the enclave module (i.e., enclave.cpp). However, the Visual Studio shows an error stating it cannot find Python.h. When I add the path including the Python.h file to the configuration of Enclave.cpp module, the visual studio shows another error as "Error cannot open source file "io.h" Enclave C:\Python27\include\pyconfig.h 68". 

It is worth mentioning that I am able to include the Python.h inside the untrusted part of the project (i.e., App.cpp).

Would you please help me how can I solve this problem.

I am using Microsoft Visual Studio 2015 professional edition on Windows 7, 64-bit operating system.

0 Kudos
1 Reply

Input/output are not allowed to be included in the Enclave due to security design. In general, even you can include python.h and compile it, it is most likely that you will get error in linking the program because the library is not static or has unsafe functions.

0 Kudos