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?
I followed the following steps while adding opencv static library in the project:-
Generated the OpenCV static library using CMake,
Added the following values in the inlucde directories :-
C:\Program Files (x86)\Intel\IntelSGXSDK\include C:\Program Files (x86)\Intel\IntelSGXSDK\include\libc++ C:\Program Files (x86)\Intel\IntelSGXSDK\include\tlibc C:\Users\fs5ve\Downloads\Opencv-static\static\opencv\include C:\Users\fs5ve\Downloads\Opencv-static\static\opencv\build-32-extra\install\include C:\Users\fs5ve\Downloads\Opencv-static\static\opencv\build-32-extra\install\include\opencv C:\Users\fs5ve\Downloads\Opencv-static\static\opencv\build-32-extra\install\include\opencv2 C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include %(AdditionalIncludeDirectories)
Added the following value in additional library directories:-
$(SGXSDKInstallPath)bin\$(Platform)\Debug;C:\Users\fs5ve\Downloads\Opencv-static\static\opencv\build-32-extra\install\x86\vc14\staticlib
Added the following values in the addtional dependecies :-
sgx_trts_sim.lib sgx_tstdc.lib sgx_tservice_sim.lib sgx_tcrypto.lib sgx_tcxx.lib sgx_urts_sim.lib sgx_uae_service_sim.lib opencv_calib3d400d.lib opencv_core400d.lib opencv_highgui400d.lib opencv_face400d.lib opencv_features2d400d.lib opencv_flann400d.lib opencv_imgcodecs400d.lib opencv_imgproc400d.lib opencv_ml400d.lib opencv_objdetect400d.lib opencv_photo400d.lib opencv_shape400d.lib opencv_stitching400d.lib opencv_superres400d.lib opencv_video400d.lib opencv_videoio400d.lib opencv_videostab400d.lib
I am getting the following error:- Cannot open include file: 'emmintrin.h': No such file or directory
I have added "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include" in the Include directories. But after that I am getting the following error:- Cannot open include file: 'malloc.h': No such file or directory