after turning BUILD_SHARED_LIBS to OFF , there are too many undefined references
previously during dynamic linking of opencv , I was using
'pkg-config --cflags --libs opencv'
for linking, but after I rebuild my opencv with flag BUILD_SHARED_LIBS to OFF, pkg-config --cflags --libs opencv is giving too much undefined reference error. I dont know how to link statically opencv, what parameters should be passed, If someone knows please tell me.
main.cpp
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
using namespace std;
int main()
{
cout<< "enter the limit";
int limit;
cin>>limit;
cv::Mat m= cv::imread("/home/odroid/Pictures/spider_man_1280x720.jpg"); //input image
cv::imshow("input grey scale", m);
cv::Ptr<cv::CLAHE> clahe = cv::createCLAHE();
clahe->setClipLimit(limit);
cv::Mat dst;
clahe->apply(m, dst);
cv::imshow("CLAHE output ",dst);
cv::waitKey();
}
g++ main.cpp -o op0 pkg-config --cflags --libs opencv