Error clahe opencv 3.0 undefined reference to symbol
Hello. Before ask here I tried http://answers.opencv.org/question/46... but didn't solve the problem.
This is the code i'm using:
'#include "opencv2/imgcodecs.hpp"
'#include "opencv2/opencv.hpp "
using namespace cv; using namespace
std; using cv::CLAHE;
int main() {
Mat m= imread("teste.png");
imshow("lena_GRAYSCALE",m);
Ptr<clahe> clahe = createCLAHE();
clahe->setClipLimit(4);
Mat dst;
clahe->apply(m,dst);
imshow("lena_CLAHE",dst);
waitKey();
}
The error: g++ -L/usr/local/lib -o "ClaheTeste1" ./main.o -lopencv_imgcodecs -lopencv_highgui -lopencv_core /usr/bin/ld: ./main.o: undefined reference to symbol '_ZN2cv11createCLAHEEdNS_5Size_IiEE' //usr/local/lib/libopencv_imgproc.so.3.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: * [ClaheTeste1] Error 1
Any idea?
read the error again, closely. it complains about missing opencv_imgproc. you have to add that to your linker cmdline
oh, and btw, to format code , use the
10101
button, not the""
button.(this made it look, like a case problem, which is not there in your original code)
oh, and btw, to format code here , use the
10101
button, not the""
button.(this made it look, like a case problem, which is not there in your original code)
Thank you berak!! I'm using < , but to paste here I put ".. You were sure about missing opencv_imgproc