gpt4 book ai didi

c++ - 加载 enclave : Couldn't open file with CreateFile() 时出错

转载 作者:行者123 更新时间:2023-11-28 05:18:54 24 4
gpt4 key购买 nike

我正在尝试编写一个简单的 SGX 项目作为开始。所以我有这个主要的主机应用程序例程,我几乎从 Lars Richter's blog 中复制了它。 :

#define ENCLAVE_FILE _T("Enclave.signed.dll")
#include <tchar.h>
#include <cstdio>
#include "sgx_urts.h"
#include "Enclave_u.h"

int main()
{
sgx_enclave_id_t eid;
sgx_status_t ret = SGX_SUCCESS;
sgx_launch_token_t token = { 0 };
int updated = 0;

ret = sgx_create_enclave(ENCLAVE_FILE, SGX_DEBUG_FLAG, &token, &updated, &eid, NULL);

if (ret != SGX_SUCCESS) {
printf("\nApp: error %#x, failed to create enclave.\n", ret);
}


scanf("\n");

return 0;
}

它编译良好(我在 Visual Studio 2015 中使用英特尔 C++ 17.0 编译器)但它不加载 enclave。我收到以下错误消息:

[sgx_create_enclavew ..\urts\win\urts.cpp:195] Couldn't open file with CreateFile()

App: error 0x200f, failed to create enclave.

最佳答案

转到app_test_save 项目设置。在Debugging 下,将工作目录 更改为$(SolutionDir)Debug。此答案假定项目 app_test_saveenclave_test_save 属于同一个解决方案。

关于c++ - 加载 enclave : Couldn't open file with CreateFile() 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41944179/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com