Does your crossover.cpp file have
extern "C" {
DATATYPE mexFunction (ARGUMENTS) {
......
}
}
except with a datatype where DATATYPE is indicated, "mexFunction" and actual arguments where ARGUMENTS is indicated?
If your mexFunction is not within an extern "C" then it will not be accessible to MATLAB.