error LNK2019无法解析的外部符号的问题怎么解决,而且我的附加库目录为什么是空的哇 求大佬解决

展开全部
收起
让阿豪来帮你解答,本回答参考chatgpt3.5编写提供,如果还有疑问可以评论或留言问题描述: 在编译程序时,出现了“error LNK2019无法解析的外部符号”的错误提示,且附加库目录为空的情况。 解决方法:
#include "opencv2/highgui.hpp"
using namespace cv;
int main() {
Mat img = imread("test.jpg");
imshow("image", img);
waitKey(0);
return 0;
}
在示例代码中,需要正确包含头文件“<opencv2/highgui.hpp>”,并正确使用命名空间cv,才能正常编译运行。 参考链接: - Visual Studio官方文档(https://docs.microsoft.com/en-us/cpp/error-messages/tool-errors/linker-tools-error-lnk2019); - OpenCV官方文档(https://docs.opencv.org/2.4/);
报告相同问题?