OpenCV error: "LINK : fatal error LNK1104: cannot open file 'opencv_core231d.lib' "
c++, error-handling, image-processing, opencv
Solution
Add the path of the library files to the library path.
Right click the project and go to Properties->Linker->Additional Library directories. Add the path to this list.
Problem
I'm trying to compile a simple code in visual studio + opencv, but got this error. Code: ``` #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> using namespace cv; int main ( int argc, char **argv ) { Mat im_gray; Mat img_bw; Mat img_final; Mat im_rgb = imread("001.jpg"); cvtColor(im_rgb,im_gray,CV_RGB2GRAY); adaptiveThreshold(im_gray, img_bw, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY_INV, 105, 1); imwrite("001-bw2.jpg", img_final); return 0; } ``` Output: ``` 1>------ Build started: Project: pibiti, Configuration: Debug Win32 ------ 1>LINK : fatal error LNK1104: cannot open file 'opencv_core231d.lib' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ``` The Linker >> Input: ``` opencv_core231d.lib opencv_highgui231d.lib opencv_video231d.lib opencv_ml231d.lib opencv_legacy231d.lib opencv_imgproc231d.lib tbb_debug.lib tbb_preview_debug.lib tbbmalloc_debug.lib tbbmalloc_proxy_debug.lib tbbproxy_debug.lib ``` How can I fix this? the file 'opencv_core231d.lib' is already there, why this error?