2019-09-16 01:23:01 -0600 | marked best answer | LNK2019 error only on debug compilation Hello. I'm new to OpenCV. I'm using OpenCV 4 on Visual Studio 2017 on a Windows 7 OS. I'm trying to compile the first tutorial app ' How to build applications with OpenCV inside the "Microsoft Visual Studio" '. It compiles and executes correctly on the release configuration, but it gives an LNK2019 linker error on the debug configuration. I compared the common library directories, C/C++ additional include directories, linker additional library directories and linker input additional dependencies properties for both Debug and Release configurations (x64) and are the same except for the final 'd' on debug libraries at additional dependencies. The linker error is on imshow function, supposedly to be at opencv_imgcodecs412d.lib, which is correctly referenced at Debug|x64 -> Linker -> Input -> Additional dependencies. These are the libraries included: opencv_calib3d412d.lib opencv_core412d.lib opencv_dnn412d.lib opencv_features2d412d.lib opencv_flann412d.lib opencv_gapi412d.lib opencv_highgui412d.lib opencv_imgcodecs412d.lib opencv_imgproc412d.lib opencv_ml412d.lib opencv_objdetect412d.lib opencv_photo412d.lib opencv_stitching412d.lib opencv_video412d.lib opencv_videoio412d.lib This is the error displayed: Error LNK2019 símbolo externo "void __cdecl cv::imshow(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &)" (?imshow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@@Z) sin resolver al que se hace referencia en la función main |
2019-09-15 17:02:31 -0600 | edited answer | LNK2019 error only on debug compilation Now it works. I started installation again from cmake. I deleted the cache at cmake-gui and then configured and generat |
2019-09-15 17:02:13 -0600 | received badge | ● Editor (source) |
2019-09-15 17:02:13 -0600 | edited answer | LNK2019 error only on debug compilation Now it works. I started installation again from cmake. I deleted the cache at cmake-gui and then configured and generat |
2019-09-15 17:01:42 -0600 | answered a question | LNK2019 error only on debug compilation Now it works. I startes installation again from cmake. I deleted the cache at cmake-gui and then configured and generat |
2019-09-15 15:24:25 -0600 | commented question | LNK2019 error only on debug compilation I generated opencv in both release and debug. I'm sure I choosed x64 in cmake, but I'm going to re-generate de project |
2019-09-13 19:29:41 -0600 | commented question | LNK2019 error only on debug compilation Hi. Thanks for your response. opencv_highgui412d.lib is also included in additional dependencies, as listed on my post. |
2019-09-12 00:56:21 -0600 | asked a question | LNK2019 error only on debug compilation LNK2019 error only on debug compilation Hello. I'm new to OpenCV. I'm using OpenCV 4 on Visual Studio 2017 on a Windows |