How to add cv::calcHist()

I’m on ubuntu and I’m using VSC, when I type cv::calcHist() it seems i dont have this function. How can I add it ?