Pass image as pointer

I’m trying to pass the address of an image to a function using a pointer so that I can change the actual image and reduce memory usage without using copies. However, I keep getting this error:

Undefined symbols for architecture x86_64:
“file::crop_image(ofxCvGrayscaleImage)”…

The file contents are:

file.h

void crop_image(ofxCvGrayscaleImage *img);

file.m


crop_image(threshold_image_copy);

void crop_image(ofxCvGrayscaleImage *img){
;
}

Please could you point me in the right direction? No pun intended.

should be

crop_image(&threshold_image_copy);

you could also just use references by changing to
void crop_image(ofxCvGrayscaleImage& img);

and your existing code would work without making any copies