Link to home
Start Free TrialLog in
Avatar of mjs2011
mjs2011Flag 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
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

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
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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