There seems to be a stray '#' on line 1 of MEX.H
.
Without seeing the file, it is hard to say what the problem is. It might be that there are blanks before the '#', or a comment - but the line is an otherwise valid #ifdef line. Once upon a long time ago (but possibly when Turbo C was created), C preprocessor directives needed the '#' in column 1.