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

"/" instead of "\\"

jpharvey1981
Beginner
1,065 Views
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!
0 Kudos
2 Replies
Steven_L_Intel1
Employee
1,065 Views
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.
0 Kudos
jimdempseyatthecove
Honored Contributor III
1,065 Views
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


0 Kudos
Reply