Hi guys. I'm using XCode IDE in my project and, trying to create a machine learning program using the ML lib. However, I'm getting an error when I try to use the namespace cv::ml. My includes are:
#include "opencv2/core/core.hpp"
#include "opencv2/ml/ml.hpp"
#include <cstdio>
#include <vector>
#include <iostream>
using namespace std;
using namespace cv;
using namespace cv::ml; --> In this line I get the error: "expected namespace name"
I guess that this error is related to some configuration that I hasn't applied on XCode. I'm using libc++ as standard lib and I already tried to change to libstdc++ (the problem persists). I also tried to use the objects in ml namespace using the fully qualified name, i.e. cv::ml::SomeMethod for example, but I get the error: "no member named ml in the namespace cv". The include of "opencv2/ml/ml.hpp" isn't generating errors.
Question is: How can I add this namespace (ml) to my project in XCode?