Avatar of mjs2011
mjs2011
Flag for Saudi Arabia asked on

I need your assistance and comment how I can enhance the Visual Studio Project

Hello I have an issue when I tried to compiled Visual studio project , I got from GitHub and I follow all instruction but still I have an issues attached

Visual studio cannot debugging because target  file exe file is missing , Please build the project and retry

Severity      Code      Description      Project      File      Line      Suppression State
Error      C2733      'CreateEnclave': you cannot overload a function with 'extern "C"' linkage      EnclaveLink      C:\Users\m_swe\source\repos\Trustee\TLSLIB\Include\enclaveapi.h      117      


// begin_1_0

/********************************************************************************

*                                                                               *

* enclaveapi.h -- ApiSet Contract for api-ms-win-core-enclave-l1-1-0            *

*                                                                               *

* Copyright (c) Microsoft Corporation. All rights reserved.                     *

*                                                                               *

********************************************************************************/



#ifdef _MSC_VER

#pragma once

#endif // _MSC_VER



#ifndef _ENCLAVEAPI_H_

#define _ENCLAVEAPI_H_



#include <apiset.h>

#include <apisetcconv.h>

#include <minwindef.h>

#include <minwinbase.h>



/* APISET_NAME: api-ms-win-core-enclave-l1 */



#if !defined(RC_INVOKED)



#ifndef _APISET_ENCLAVE_VER

#ifdef _APISET_TARGET_VERSION

#if _APISET_TARGET_VERSION >= _APISET_TARGET_VERSION_WINTHRESHOLD

#define _APISET_ENCLAVE_VER 0x0100

#endif

#endif

#endif



#endif // !defined(RC_INVOKED)





#ifdef __cplusplus

extern "C" {

#endif



#pragma region Desktop Family or OneCore Family



#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)



    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        IsEnclaveTypeSupported(

            _In_ DWORD flEnclaveType

        );





    WINBASEAPI

        _Ret_maybenull_ _Post_writable_byte_size_(dwSize)

        LPVOID

        WINAPI

        CreateEnclave(

            _In_ HANDLE hProcess,

            _In_opt_ LPVOID lpAddress,

            _In_ SIZE_T dwSize,

            _In_ SIZE_T dwInitialCommitment,

            _In_ DWORD flEnclaveType,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpEnclaveInformation,

            _In_ DWORD dwInfoLength,

            _Out_opt_ LPDWORD lpEnclaveError

        );





    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        LoadEnclaveData(

            _In_ HANDLE hProcess,

            _In_ LPVOID lpAddress,

            _In_reads_bytes_(nSize) LPCVOID lpBuffer,

            _In_ SIZE_T nSize,

            _In_ DWORD flProtect,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpPageInformation,

            _In_ DWORD dwInfoLength,

            _Out_ PSIZE_T lpNumberOfBytesWritten,

            _Out_opt_ LPDWORD lpEnclaveError

        );





    WINBASEAPI

        _Success_(return != FALSE)

        BOOL

        WINAPI

        InitializeEnclave(

            _In_ HANDLE hProcess,

            _In_ LPVOID lpAddress,

            _In_reads_bytes_(dwInfoLength) LPCVOID lpEnclaveInformation,

            _In_ DWORD dwInfoLength,

            _Out_opt_ LPDWORD lpEnclaveError

        );





#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */

#pragma endregion



#ifdef __cplusplus

}

#endif



#endif // _ENCLAVEAPI_H_

// end_1_0

Open in new window


GitHub link for project : https://github.com/HSG88/Trustee
error1.jpg
error2.jpg
C++Microsoft Visual Studio

Avatar of undefined
Last Comment
Frank Helk

8/22/2022 - Mon
David Johnson, CD

Visual Studio 2017 (make sure to mark on C/C++, C#, and Windows SDK 8.1)
Truffle Ganache
Solc
Intel SGX-SDK
Build
Open Trustee.sln with Visual Studio 2017
Set App as the startup project
Extract Solc archive into the directory Trustee\Win32
Build the solution
ASKER CERTIFIED SOLUTION
sarabande

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Frank Helk

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Accept: sarabande (https:#a43074286)

If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes