title: OpenCV C++ Flann IndexParams and SearchParams error
body: <p>Opencv 3.2 C++. I am creating a method that can take any set of keypoint descriptors and use any of the matching algorithms as specified by the user. When I try to build my code I get the following errors. </p>
  
  <ol>
  <li>cv::flann::IndexParams::~IndexParams(), referenced from:</li>
  <li>cv::flann::SearchParams::SearchParams(int, float, bool), referenced from:</li>
  <li>cv::flann::KDTreeIndexParams::KDTreeIndexParams(int), referenced from:</li>
  <li>clang: error: linker command failed with exit code 1 (use -v to see invocation)</li>
  </ol>
  
  <p>UPDATE - When I run the standard Flann tutorial found on OpenCV website in sublime it executes with no errors. This leads me to believe that the issue is with Xcode but am still not 100% sure on this. </p>
  
  <p>I am using xcode and am still figuring out the interface and there is no specific like stated as to cause the error. My code is as follows;`</p>
  
  <pre><code>std::tuple&lt;std::vector&lt; DMatch &gt;,Mat&gt; matchFeatures(std::vector&lt;KeyPoint&gt; kp1, Mat desc1, std::vector&lt;KeyPoint&gt; 
  kp2, Mat desc2, String keypointsMatcher){
      std::vector&lt; DMatch &gt; matches;
      vector&lt;vector&lt; DMatch &gt;&gt; knnMatches;
      double max_dist = 0, min_dist = 100;
      Mat homography;
  
      if(keypointsMatcher == "bruteForce"){
          BFMatcher matcher;
          matcher.match(desc1, desc2, matches);
      }
      else if( keypointsMatcher == "flann" ){
          if(desc1.type()!=CV_32F) {
              desc1.convertTo(desc1, CV_32F);
          }
          if(desc2.type()!=CV_32F) {
              desc2.convertTo(desc1, CV_32F);
          }
  
          FlannBasedMatcher matcher;
          matcher.match( desc1, desc2, matches );
     }
      //-Run Knn Flann based matcher. Will create a vector of vectors (vector&lt;vector&lt; DMatch &gt;&gt;)
      else if (keypointsMatcher == "knn"){
          if(desc1.type()!=CV_32F) {
              desc1.convertTo(desc1, CV_32F);
          }
          if(desc2.type()!=CV_32F) {
              desc2.convertTo(desc1, CV_32F);
          }
  
          FlannBasedMatcher matcher;
          matcher.knnMatch(desc1, desc2, knnMatches, 2);
       }
  
      //-- Quick calculation of max and min distances between keypoints
      for( int i = 0; i &lt; desc1.rows; i++ ){
          double dist = matches[i].distance;
          if( dist &lt; min_dist ) min_dist = dist;
          if( dist &gt; max_dist ) max_dist = dist;
      }
  
  
      return{matches,homography};
  </code></pre>
  
  <p>}`</p>
  
  <p>Any help is appreciated!</p>