Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29398 ディスカッション

Error while compiling from Matlab

Mateusz_Gos
ビギナー
1,849件の閲覧回数
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 件の賞賛
5 返答(返信)
Steven_L_Intel1
従業員
1,849件の閲覧回数
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.
Mateusz_Gos
ビギナー
1,849件の閲覧回数
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
Steven_L_Intel1
従業員
1,849件の閲覧回数
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.
khales
ビギナー
1,849件の閲覧回数
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.
Steven_L_Intel1
従業員
1,849件の閲覧回数
/assume:[no]bscc is correct. Sorry for the earlier error.
返信