Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

that's a funny way, specifying link-libs via #pragma, ;)

  1. you're missing opencv_features2d244d.lib ( and for SURF, probably opencv_nonfree244d.lib, too )
  2. please also include #include "opencv2/features2d/nonfree.hpp" and add cv::initModule_nonfree(); as first line in main, SIFT ans SURF are non-free.
  3. you need 2 #pragma blocks, one for debug, another for release (you can't run a debug build with release dlls, and vice versa)

#ifdef DEBUG
 #pragma comment (lib , "opencv_core244d.lib")
 #pragma comment (lib ,"opencv_highgui244d.lib")
 //... more libs
#else
 // same libs, but without "d" at the end:
 #pragma comment (lib , "opencv_core244.lib")
 #pragma comment (lib ,"opencv_highgui244.lib")
 //... more libs
#endif