Adding OpenCV libraries in SGX-Enclave Project

asked 2018-05-22 12:13:12 -0600

faysal gravatar image

I am trying to add OpenCV in my enclave project. I can run the OpenCV project as a standalone win32 console application in visual studio 2015. But when I started doing that in my enclave project I am getting errors. I tried to add the following libraries from opencv in enclave project:

#include "windows.h"
#include <opencv2/core/core.hpp>
#include "opencv2/imgcodecs.hpp"
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <opencv2/face.hpp>
#include "drawLandmarks.hpp"

But I am getting tons of error. I also need to include windows.h file in my project. Are those libraries are allowed to include in the enclave project?

edit retag flag offensive close merge delete

Comments

try to put the windows.h after the opencv includes (or do away with it entirely, if you can)

also: opencv version ?

what are the errors, exactly ?

berak gravatar imageberak ( 2018-05-22 12:17:52 -0600 )edit

I also need to include windows.h file in my project

maybe (i have no idea about sgx). but you're probably doing it in the wrong place.

isolating the sgx related code away from the opencv code might be, what you need here.

berak gravatar imageberak ( 2018-05-22 12:26:17 -0600 )edit

you also need to explain, how your sgx code is related to opencv at all.

berak gravatar imageberak ( 2018-05-22 12:33:59 -0600 )edit

I am just adding the following line:

#include <opencv2/core/core.hpp>

It shows me "Cannot open include file: 'emmintrin.h'": No such file or directory.

I want to write some OpenCV code in SGX enclave trusted zone. But when I start doing that I am getting bunches of errors. Maybe I am adding the libraries in wrong way, But I can sucessfully run the opencv project as win32 application but when I try to run it in sgx enclave project it gives me error.

faysal gravatar imagefaysal ( 2018-05-22 15:55:00 -0600 )edit

that's a VS internal header, not an opencv one.

berak gravatar imageberak ( 2018-05-23 05:34:06 -0600 )edit

Actually, I am not sure about that. I have already posted in https://software.intel.com/en-us/forums/intel-software-guard-extensions-intel-sgx/topic/779298. But no one is responding there.

faysal gravatar imagefaysal ( 2018-05-23 13:39:35 -0600 )edit