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

Path for FORTRAN libarary with converted CVF6 projects

dave_buckley
Beginner
673 Views

Currently when an upgraded VS6/CF6 projects that have C++ mains, thoseprojects are setup togethave a hardcoded path to the Fortan Lib folder instead of using one of the fortran environment variables. This is in the Project Configuration->Linker->General->Additional Library Directories

For example if a project is converted today it will have c:\\\\program files\\\\intel\\\\compiler\\\\11.1\\\\060\\\\lib\\\\ia32 in the field.

Certainly a hardcoded path will become an issue when patches are installed and/or when folder is either removed or superceeded by a later version.

Would seem that the path in the project(s) really should be setup to utilize either IFortInstallDir or IFORT_COMPILIER11 to create the path or that the environment directories be setup to use the same environment variables. However it doesn't seem like the C environment recognizes the IFortInstallDir variable. Also it similarly doesn't seem that IFORT_COMPILIER11 follows a switch to a different version of FORTRAN in the IDE.

Shuoldwill both variable track to the same path so that compilation and linking will follow?

Is there a preferred or best practice for referencing the LIB path when required for linking with C main projects?

Thoughts?

0 Kudos
6 Replies
Steven_L_Intel1
Employee
673 Views

Interesting - I was not aware that it did that, though I can understand why. Ideally, you'd add the appropriate folder (using $(IFORT_COMPILER11)) to Tools > Options > Projects and Solutions > VC++ Directories, bit the Converter doesn't know if you have done that.

I agree it should make use of the environment variable - I'll suggest that to the developers.

0 Kudos
Steven_L_Intel1
Employee
673 Views
Escalated as DPD200151217.
0 Kudos
dave_buckley
Beginner
673 Views

One follow up to this:

The IFORT_COMPILER11 environment variable doesn't track as the "IVF FORTRAN Selected Compiler" is switched in the IDE.

Onewould assume that IFortInstallDir IVF variable should resolve to the appropriate 11.1.035 path when this is done. However this variable cannot be referenced in the VCPROJ or VS2008 environment.

For example the following output is shown during the build.

2>Compiling with Intel Visual Fortran 11.1.035 [IA-32]...

Environment Variable

IFORT_COMPILER11=C:\Program Files\Intel\Compiler\11.1\060\

So it would seem that whilethe environment variable must be used it also may need additional manual setup.

Thanks

Dave

0 Kudos
Steven_L_Intel1
Employee
673 Views
This is true, but this setting is for the C++ project which is not affected by that selection. However, the install folks insist that the environment variable isn't always set, though I have not seen that happen.
0 Kudos
dave_buckley
Beginner
673 Views

Intel Fortran currently allows a user toswitchto any compiler installed. This actually works since I have switched between 35 and 60 to test the the command line console issue.

As noted the environment variable never tracks with the selected compiler.

So as I see it theonly proper way for a C++ main project to be setup for FORTRAN link resolution would be to usethe hardcoded path. So that MUST be changed in conjuction with the compiler selection.

Thanks

Dave

0 Kudos
Steven_L_Intel1
Employee
673 Views

You can switch compilers, yes, but that applies to Fortran projects only. It does not affect C++ builds.

I've been informed that the IFORT_COMPILER11 environment variable might not be defined if the person doing the install chose a custom install and deselected that option. It's not clear to me what a good solution to this would be. You can always hand-edit the path to use the environment variable.

0 Kudos
Reply