可能重複:
OpenCV: link error, can’t resolve external symbol _cvResize and _cvCvtColor
What is an undefined reference/unresolved external symbol error and how do I fix it?OpenCV的安裝,未解決的外部符號
我已經嘗試了所有在其網站上提供的教程,和計算器的解決方案,但我仍然找不到解決方案。
我已經做過的事情:
1-添加了include頭文件夾。
2-加入lib文件夾到附加lib目錄
3-加入opencv_core243d.lib和opencv_highgui243d.lib到附加的依賴性。
代碼我試圖編譯:
#include <stdio.h>
#include <cv.h>
#include <highgui.h>
int main(int argc, char* argv[])
{
if (argc < 2)
{
printf("Usage: ./opencv_hello <file.png>\n");
return -1;
}
IplImage* img = cvLoadImage(argv[1], CV_LOAD_IMAGE_UNCHANGED);
if (!img)
{
return -1;
}
cvNamedWindow("display", CV_WINDOW_AUTOSIZE);
cvShowImage("display", img);
cvWaitKey(0);
return 0;
}
的連接提供了關於懸而未決的符號,如cvLoadImage,cvWaitKey等 我能想到的唯一的事情將是庫的錯誤,但我已經包括他們已經。
@BoPersson也試過,同樣的錯誤 –