Put your MEX-files in a folder on the MATLAB® path. Alternatively, run MATLAB from the folder containing the MEX-file. MATLAB runs functions in the current working folder before functions on the path.
To see the current folders on your path, use the path function. You can add new folders to the path either by using the addpath function, or by selecting File > SetPath to edit the path.
If you use a Windows® operating system and your binary MEX-files are on a network drive, be aware that file servers do not always report folder and file changes correctly. If you change a MEX-file on a network drive and find that MATLAB does not use the latest changes, you can force MATLAB to look for the correct version of the file by changing folders away from and then back to the folder containing the file.