我正在通过 Visual Studio 的“批处理构建” 工具为我的应用设置安装文件,以在其他计算机上运行,但问题是代码包含2个DLL: "OpenCV"
和"Chilkat"
。它们使编译器感到困惑,因为即使在我使用“ Build Solution” 时,即使编译器工作正常,也无法找到其目录。
我尝试了两种方法:
"D:\Visual Studio 2015\VC\include\"
,但结果非常糟糕。我无法理解错误的含义。这是其中一种错误。
Error LNK2019 unresolved external symbol "void __cdecl cv::warpAffine(class cv::_InputArray const &,class cv::_OutputArray const &,class cv::_InputArray const &,class cv::Size_<int>,int,int,class cv::Scalar_<double> const &)" (?warpAffine@cv@@YAXAEBV_InputArray@1@AEBV_OutputArray@1@0V?$Size_@H@1@HHAEBV?$Scalar_@N@1@@Z) referenced in function "class cv::Mat __cdecl rotate(class cv::Mat &,double,struct CvPoint)" (?rotate@@YA?AVMat@cv@@AEAV12@NUCvPoint@@@Z)
#include <D:/OpenCV3.0/opencv/build/include/opencv2/opencv.hpp>
但是它仍然失败,因为头文件仅使用动态目录。这意味着如果使用这种方式,我必须更改所有头文件的目录。
问题是::当我使用“批量生成”时,如何使编译器识别我的第三方dll? 如果有人对此有所了解,请告诉我。非常感谢。 这是代码和错误
#include "cpprest/containerstream.h"
#include "cpprest/filestream.h"
#include "cpprest/http_client.h"
#include "cpprest/json.h"
#include "cpprest/producerconsumerstream.h"
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <cstring>
#include <string>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkBinData.h>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/opencv.hpp>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkXml.h>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkJsonObject.h>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/core/core.hpp>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/highgui/highgui.hpp>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/imgproc/imgproc.hpp>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/objdetect/objdetect.hpp>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkMime.h>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkByteData.h>
#include <D:/Chilkat/chilkat-9.5.0-x86-vc2015/include/CkFileAccess.h>
#include "conio.h"
#include <fstream>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/face.hpp>
#include <direct.h>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/face/facerec.hpp>
#include <D:/OpenCV3.0/opencv/build/include/opencv2/highgui/highgui.hpp>
错误C1083无法打开包含文件:'opencv2 / core.hpp':没有此类文件或目录MicrosoftFaceAPI