"/" instead of "\\"

"/" instead of "\\"

I tried to use the vdrnggaussuanmv.f example given in the mkl library. I created a new console (using visual studio 2008)and just copy paste the code. In the project--> Console Properties --> Fortran --> General, I added the following Additional Include Directories: 'C:\\Program Files\\..\\mkl\\examples\\vslf\\source'

After compilingmy project I received the following error:

error #5102 : Cannot open include file 'errcheck.inc'

I made a second attempt using the following Additional dependencies:

C:/Program Files /.../mkl/examples/vslf/source' and the code is now working.

I amusually working in "Pascal" where the path are specified using '\'. Is it normal to specified directories using'/' in Fortran or is it related to the fact that I am using a french version of windows XP or a setting option in VS2008?

Thank you in advance for your help!

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Fortran has no concept of directories or the set of characters in a file path. I know that Visual Studio sometimes uses forward slashes instead of backslashes - I've never quite understood this. But I have never had a problem using backslashes in file paths. I can't comment on whether it matters that you're using a French version of Windows - seems unlikely to me.

Steve

Were you using

include 'errcheck.inc' (Fortran include)

or

#include 'errcheck.inc' (Fortran preprocessorinclude)

If the former, then I think either slash will work

If the latter, then use forware slash (or double back slash) since #include uses the C escape character ''

e.g. '\n' is line feed, '\' is one backslash.

Depending on what uses the macro containing the backslash in the include path, will depend on if you require one or two backslashes.

Jim Dempsey

www.quickthreadprogramming.com

Login to leave a comment.