winodws 7, 64-bit, Graphics adapter is NVIDIA GeForce GT 610, I have correctly installed the graphics driver and CUDA 5, I use CMake correctly compiled OpenCV2.4.6 + GPU.In Release mode, everything is normal, but, in Debug mode, the image can not be displayed(For example, namedWindow function can not be performed). Debug Error:OpenCV Error, Unspecified error . I uninstalled OpenCV, than I installed GTK2, restart the computer, I installed OpenCV again. Release mode, it is normal, Debug mode is still wrong, it can't show images. I repeated several times, still does not solve the problem. Please help me in solving this problem. Thanks in advance.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use CMake to link libraries and include directories. It makes your life easier and also for anyone else who will be extending/reading your code in the future.
For example, to link OpenCV, use the follow lines of code:
FIND_PACKAGE( OpenCV REQUIRED )
TARGET_LINK_LIBRARIES( myProject ${OpenCV_LIBS} )
回答2:
Be sure to link the debug libraries and only the debug libraries. I once had this problem while mixing debug and non debug libraries in debug mode.