Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Error while compiling from Matlab

Mateusz_Gos
Beginner
1,578 Views
This is the warning I get when trying to compile a set of Fortran routines:

>> mex count.f90 C:\\Users\\admin\\Documents\\MATLAB\\work\\*.for
count.f90(103): warning #5275: The backslash character and following character is not a valid escape sequence
character*32, parameter :: base_dir='C:\\Program Files\\Matlab\\liquids\'

To me it seems all right and I have no idea what to change. Any clues?

cheers
0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,578 Views
You have the /assume:backslash option on which tries to interpret backslashes in character strings as C escape sequences. Remove it. If "mex" won't allow you to do that, try adding "/assume:nobackslash" to the command line.
0 Kudos
Mateusz_Gos
Beginner
1,578 Views
thanks a lot, this looks promising... thing is not surprisingly it is not listed in the options available from Matlab in the mex -sth syntax, so i thought i would change it in one of the Visual Fortran Compiler *.stp files in mexopts directory but cannot find this phrase anywhere...

once again cheers and would be great to hear more from you or someone else
0 Kudos
Steven_L_Intel1
Employee
1,578 Views
I am not familiar with how Matlab does its compiles. This "*.stb" must be a Matlab thing. The key here is that something is telling the compiler to enable this option, which is not on by default.

You may also want to look at ifort.cfg in the compiler's BIN folder - someone may have edited that.
0 Kudos
khales
Beginner
1,578 Views
Are you sure it is /assume:nobackslash? Because the Matlab .stp file has /assume:bscc (I don't know why The MathWorks did this!) which seems to be turning the feature on , and I think it is/assume:nobscc to turn it off.
0 Kudos
Steven_L_Intel1
Employee
1,578 Views
/assume:[no]bscc is correct. Sorry for the earlier error.
0 Kudos
Reply