我正在尝试在我的飞地项目中添加OpenCV。我可以在Visual Studio 2015中将OpenCV项目作为独立的win32控制台应用程序运行。但是当我在我的飞地项目中开始这样做时,我遇到了错误。我试图在安卓项目的opencv中添加以下库:
#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"
但我收到了大量的错误。我还需要在我的项目中包含windows.h文件。这些图书馆是否被允许包含在飞地项目中?
我在项目中添加opencv静态库时遵循以下步骤: -
使用CMake生成OpenCV静态库,
在inlucde目录中添加了以下值: -
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 \下载\ opencv的静电\静\ OpenCV的\包括 C:\ Users \用户fs5ve \下载\ opencv的静电\静\ OpenCV的\集结32多\安装\包括 C:\ Users \用户fs5ve \下载\ opencv的静电\静\ OpenCV的\集结32多\安装\包括\ OpenCV的 C:\ Users \用户fs5ve \下载\ opencv的静电\静\ OpenCV的\集结32多\安装\包括\ opencv2 C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ include %(AdditionalIncludeDirectories)
在其他库目录中添加了以下值: -
$(SGXSDKInstallPath)仓\ $(平台)\调试; C:\ Users \用户fs5ve \下载\ opencv的静电\静态\的OpenCV \建立-32-额外\安装\ 86 \ VCl 4 \ staticlib
在地址依赖项中添加了以下值: -
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
我收到以下错误: - 无法打开包含文件:&#39; emmintrin.h&#39;:没有这样的文件或目录
我添加了&#34; C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ VC \ include&#34;在Include目录中。但之后我收到以下错误: - 无法打开包含文件:&#39; malloc.h&#39;:没有这样的文件或目录
答案 0 :(得分:1)
问题是OpenCV有许多依赖项和指令,这些依赖项和指令在Enclave中是不可用的(例如Intel SSE或标准pthreading)。
所以直接链接是不可能的,但你总是可以移植它 - 虽然我必须告诉它相当大的工作,所以你必须考虑它是否值得。