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

How to refer to the Intel installation directory in a project file?

Arjen_Markus
Honored Contributor II
630 Views
Hello,

we have the following problem:
A program that is written mainly in Fortran has a C++ main program to take care some
start-up tasks. Because of thisthe linker does not automatically include the Fortran
runtime libraries and we need to specify the directory where these are located explicitly.

However that is dependent on the particular installation and the particular version.

Is there a macro we can use (like $(ConfigurationName)or something else to make
the project file that describes the program and the associated build process in a way
that does not depend on the exact directory where the libraries are stored?

(I thought IFIDEInstallDir might do the trick, but Visual Studio does not know
about it. We are using Intel Fortran 11.x)

Regards,

Arjen
0 Kudos
4 Replies
Steven_L_Intel1
Employee
630 Views
$(IFORT_COMPILER11) is what you want. This will get you to the 11.1\nnn folder.

Edited to correct name.
0 Kudos
Jeffrey_A_Intel
Employee
630 Views
I'm sure Steve meant to enter $(IFORT_COMPILER11). And if you're using ifort 12.n, it'll be $(IFORT_COMPILER12).
0 Kudos
Steven_L_Intel1
Employee
630 Views
Indeed it is - thanks, Jeff. I'll also note that the subfolder structure changed in version 12, so you can't just switch the environment variable names.
0 Kudos
Arjen_Markus
Honored Contributor II
630 Views
Thanks for this information - it does indeed compile and link properly.

Regards,

Arjen
0 Kudos
Reply