- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, everyone.
I am facing difficulty while trying to include certain header files in enclave project. For instance, the following statements result into a warning message (cannot open source file):
#include <malloc.h>
#include <atomic>
Although the application project can successfully include these header files, the enclave project fails to do so. Any idea?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using the SGX SDK 1.7 release and the libc++ library?
Your enclave should include $(SGXSDKInstallPath)include\libc++ instead of $(SGXSDKInstallPath)include\stlport
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try including <stdlib.h> and <stdatomic.h>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Juan,
Thanks for your reply.
Is it possible to include standard C++11 headers like <atomic> in an enclave project?
Nazmus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On Windows yes, because we support C++11.
The Linux SGX SDK doesn't support C++11 yet. However, there's a branch in github that shows a preliminary effort. It's not product quality though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your response.
I am using Windows.
But, when I tried to include atomic header in an enclave project (#include <atomic>), I got an error "cannot open source file atomic".
Do I need to change any project configuration settings?
Nazmus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have used the same header file in my project and it is not showing any error. Which version of SGX and Visual studio are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using the SGX SDK 1.7 release and the libc++ library?
Your enclave should include $(SGXSDKInstallPath)include\libc++ instead of $(SGXSDKInstallPath)include\stlport
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Juan. It worked. Previously, I was using stlport in my enclave project.
Hi Anusha, I am using SGX SDK 1.7 and Visual Studio 2015 Professional.
Nazmus
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page