Summary
Four steps to integrate the Intel® SGX trusted pthread library with your Intel® SGX enclave Linux solution.
Description
- Added -lsgx_pthread to link options in Makefile
- Compiler could not find pthread_create() and other pthread function calls
Resolution
- Copy sgxsdk/include/sgx_pthread.edl to the Enclave source directory.
- In Enclave.edl, add: from "sgx_pthread.edl" import *;
- In Enclave.cpp, add: #include "pthread.h"
- In Makefile, add -lsgx_pthread to link statement