I have an error of using CvMatToImageView() function in main.cpp
#include "morph.hpp"
...
cv::Mat frame;
ImageView grayscale_image;
...
CvMatToImageView(frame, grayscale_image);
...
error
/home/.../main.cpp:2714: error: undefined reference to `CvMatToImageView(cv::Mat const&, ImageView&)'
morph.hpp file has declaration of CvMatToImageView() function
...
void CvMatToImageView(const cv::Mat& frame, ImageView& image);
...
morph.cpp file has definition of this function
#include "morph.hpp"
void CvMatToImageView(const cv::Mat& frame, ImageView& image)
{ ... }
If you define the function in main.cpp then it will work. What's wrong? Please help. Thanks