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

Where is the environmental variables set in Visual Studio 2010?

Jihoe_K_
Beginner
1,550 Views

 

 I am using XE Composer 2013  with Visual Studio 2012.

To add additional include path with a simple statement, I want to define an environmental variable.

I searched google in regard with this, but all things are about C++, and seems to be different from a Fortran Project.

 

Where are the environmetal variables for VS defined?

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
7 Replies
SergeyKostrov
Valued Contributor II
1,550 Views
>>...Where are the environmetal variables for VS defined? Take a look at: Tools -> Options -> Projects and Solutions and select an item for Directories ( Executable, Include, Reference, Library, Source, Exclude ).
0 Kudos
Jihoe_K_
Beginner
1,550 Views

   This is my "Project and Solution" menu (in Attached File). There is no such a thing as Directories.  There is no menu about fortran thing. Is there something wrong?

0 Kudos
Steven_L_Intel1
Employee
1,550 Views

Sergey, that's not what's being asked.

The answer is that it is identical to that for a C++ project, under Debugging > Environment. Click the arrow to the right of the field and select Edit. Put your variables in, one per line, in the form name=value. Unlike in some other properties, you can't just put in a comma or semicolon-delimited list. The settings are stored in the .vfproj.user file.

0 Kudos
SergeyKostrov
Valued Contributor II
1,550 Views
>>This is my "Project and Solution" menu (in Attached File). There is no such a thing as Directories. There is no menu >>about fortran thing. Is there something wrong? Sorry, my mistake and take a look at: Tools -> Options -> Intel Composer XE -> Visual Fortran -> Compilers ( search paths for Executables, Libraries and Includes could be set )
0 Kudos
Steven_L_Intel1
Employee
1,550 Views

Still not what is being asked for, though it is useful to understand that option page in general. The page Sergey points to is for defining how the compiler and build tools get invoked - where VS looks for the compiler and what the default library and include directories are. It is not where you define user-specified environment variables.

0 Kudos
SergeyKostrov
Valued Contributor II
1,550 Views
For example, I declared a regular Windows environment variable, like: ... set WORKLIB_DIR = C:\[ SomePath ]\ - this is the path to some directory where all 3rd party libraries are installed ... and then I use it in a Visual Studio, like: ... $(WORKLIB_DIR)TBB\Include - this is the path to the directory with Intel TBB header files ...
0 Kudos
Steven_L_Intel1
Employee
1,550 Views

I must apologize - it seems I was the one who misunderstood the question.

Yes, the method for setting default directory paths is now different in Fortran than C++ - it used to be the same but C++ changed in VS2010 to use separate property pages. To be honest, I find the new C++ method to be confusing and complex, but...

Sergey has the right approach to add default include paths for all projects. Yes, you can also use your own environment variables but they need to be defined in the context of where VS is run.

0 Kudos
Reply