Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

C++ Error about "Expected primary-expression before ‘>’ token"

I'm trying to load a xml file using a SVM obeject.

While running this following code: "svmNew = SVM::load<svm>("Liveness_classifier.xml");"

It's showing the following error: "error: expected primary-expression before ‘>’ token"

If I change the code like this: "svmNew = SVM::load("Liveness_classifier.xml");"

Then it's showing the following error: (.text+0xa7f): undefined reference to `lbp::OLBP(cv::Mat const&, cv::Mat&)'

collect2: error: ld returned 1 exit status

Does anyone have any solution for this kind of error? I'm using Ubuntu 16.4 and OpenCV3.4. And this is a C++ code. If anyone need further more information then please do let me know. Thanks in advance.

click to hide/show revision 2
None

updated 2018-03-07 08:11:40 -0600

berak gravatar image

C++ Error about "Expected primary-expression before ‘>’ token"

I'm trying to load a xml file using a SVM obeject.

While running this following code: "svmNew code:

svmNew = SVM::load<svm>("Liveness_classifier.xml");"

SVM::load<SVM>("Liveness_classifier.xml");

It's showing the following error: "error: error:

error: expected primary-expression before ‘>’ token"

token

If I change the code like this: "svmNew this:

svmNew = SVM::load("Liveness_classifier.xml");"

SVM::load("Liveness_classifier.xml");

Then it's showing the following error: error:

(.text+0xa7f): undefined reference to `lbp::OLBP(cv::Mat lbp::OLBP(cv::Mat const&, cv::Mat&)'cv::Mat&)

collect2: error: ld returned 1 exit status

Does anyone have any solution for this kind of error? I'm using Ubuntu 16.4 and OpenCV3.4. And this is a C++ code. If anyone need further more information then please do let me know. Thanks in advance.