- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Assuming I have an "enclave.edl" file and two header files "definitions1.h" and "definitions2.h"
when I use "second_type" from "definitions2.h" in my "enclave.edl" it does not recognize it,
but when I use "first_type" from "definitions1.h" it works fine.
why does that happen, and how can I make it work?
(I can put all my definitions in the first header file but it creates a big mess.)
enclave.edl
enclave
{
#include "definitions1.h"
trusted
{
ecallFoo(second_type test);
};
untrusted
{
};
};
definitions1.h
#ifndef TRUSTED_DEFINITIONS1_H_
#define TRUSTED_DEFINITIONS1_H_
#include "definitions2.h"
#define first_type int
#endif /* TRUSTED_DEFINITIONS1_H_ */
definitions2.h
#ifndef TRUSTED_DEFINITION2_H_
#define TRUSTED_DEFINITION2_H_
#define second_type int
#endif /* TRUSTED_DEFINITION2_H_ */
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The nested header file should work. There are a couple of issues of the code that you provided:
1. In the EDL trusted part, you should declare the function as public and have a return type such as
2. Please remember that the EDL gets compiled so any definition of "#define second_type int" is translated back into "int" in the generated code. If you want to use second_type again, you simply need to add the "include" statement in the c/cpp file again such as
#include "definitions1.h" or #include "definitions2.h"
Please give a try and see whether the changes help.
Thanks,
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page