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:

The file contents are:


void crop_image(ofxCvGrayscaleImage *img);



void crop_image(ofxCvGrayscaleImage *img){

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

should be


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

and your existing code would work without making any copies