Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
57 Views

How to change /Qvc after Installation

Jump to solution

Hello,

I am using Intel Parallel Studio XE 2015 Update 7 Composer Edition for Windows to compile Fortran files with  C-Files. I addition I have installed Visual Studio 2013 and Visual Studio 2015.

I have a solution opened in VS2015 which is a mixed Fortran/C-solution to generate a static lib file. The platform toolset of the C project is set to VS2013, but when I compile the Fortran project the /Qvc14 switch is set. How can I change to /Qvc12 to use VS2013 instead?

When I link that lib to other object files I get the error "LINK : fatal error LNK1104: cannot open file 'legacy_stdio_definitions.lib'". Using google I found out, that this happens when compiling with VS2015.

For testing purpose I added the fortran files to the C project and used the custom build tool setting to compile the fortran files. When doing so, I can link the resulting lib (combined Fortran/C-sources) successfully to my other projects. So I guess the Qvc switch is responsible for this error.

I read that I can change that setting by reinstalling the compiler. Is there another option to fix this without a reinstallation or is there an option in the properties window of the Fortran project which I didn't recognize yet?

Thank you very much!

0 Kudos

Accepted Solutions
Highlighted
Employee
57 Views

Thank you. Are there any options added under: Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers > Default Options (on the Win32 tab)?

View solution in original post

0 Kudos
12 Replies
Highlighted
Employee
57 Views

For your Fortran project try specifying the /Qvc12 option under the Configuration Properties > Fortran > Command Line > Additional options. (See /Qvc in the Fortran UG for more, https://software.intel.com/en-us/node/691793)

0 Kudos
Highlighted
Beginner
57 Views

I tried this already. This is not working.

When I do so, I get the following warning:

ifort: command line warning #10121: overriding '/Qvc12' with '/Qvc14'

 

0 Kudos
Highlighted
Black Belt
57 Views

You may have the option /Qvc12 specified in the configuration file ifort.cfg, which is located in the bin\<arch> directory where the compiler itself is installed. Furthermore, you may ignore the warning if the linker produced a working EXE.

0 Kudos
Highlighted
Employee
57 Views

I can't reproduce the warning by adding only a single /Qvc option under Additional Options, but I can with adding two so it seems two are getting onto the ifort command-line somehow.

0 Kudos
Highlighted
Beginner
57 Views

mecej4 wrote:

You may have the option /Qvc12 specified in the configuration file ifort.cfg, which is located in the bin\<arch> directory where the compiler itself is installed. Furthermore, you may ignore the warning if the linker produced a working EXE.

My ifort.cfg in the ia32 and the intel64 folder are empty. Unfortunately the linker doesn't produce a working EXE. But when I manually compile the fortran files and link them, I get a working exe. 

Davis, Kevin D wrote:

I can't reproduce the warning by adding only a single /Qvc option under Additional Options, but I can with adding two so it seems two are getting onto the ifort command-line somehow.

You are right when I add the /Qvc12 option in the Additional Options field, there are two /Qvc options in the command line command, but I don't where the /Qvc14 comes from.

In the Command Line Property Page of my fortran project the output of the All Options field is the following:

/nologo /O2 /I"C:\Program Files (x86)\PSCAD46\emtdc\if9\inc" /I"C:\Program Files (x86)\PSCAD46\emtdc\if9\windows" /free /warn:declarations /real_size:64 /align:dcommons /fpe:0 /fpconstant /module:"Release\\" /object:"Release\\" /Fd"Release\vc140.pdb" /libs:static /threads /c

But in the build log the following command is shown:

ifort /nologo /O2 /I"C:\Program Files (x86)\PSCAD46\emtdc\if9\inc" /I"C:\Program Files (x86)\PSCAD46\emtdc\if9\windows" /free /warn:declarations /real_size:64 /align:dcommons /fpe:0 /fpconstant /module:"Release\\" /object:"Release\\" /Fd"Release\vc140.pdb" /libs:static /threads /c /Qvc12 /extfor:f /Qvc14 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\\bin" "C:\Projects\src\interface.f"
ifort: command line warning #10121: overriding '/Qvc12' with '/Qvc14'

I don't know how to disable the last two options (/Qvc14 and /Qlocation, the /extfor:f option shouldn't have any impact). I am sure that this would resolve my issue. Because as I wrote before compiling it manually without these options leads to a working exe.

0 Kudos
Highlighted
Employee
57 Views

Any chance you can attach just your .vfproj file?

0 Kudos
Highlighted
Beginner
57 Views

Davis, Kevin D wrote:

Any chance you can attach just your .vfproj file?

Yes, no problem.

0 Kudos
Highlighted
Employee
58 Views

Thank you. Are there any options added under: Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers > Default Options (on the Win32 tab)?

View solution in original post

0 Kudos
Highlighted
57 Views

There are a couple of environment variables that could add command line options, and just having an existing file.

If the "ifort" tool finds a file called "ifort.cfg" in its same directory, it reads that for additional command line options.

It also looks for the environment variable IFORTCFG, to see if that points to another file (usually named "ifort.cfg") .

It also looks for environment variables __INTEL_PRE_FFLAGS or __INTEL_POST_FFLAGS which could include other command line options.

I would check for those.

By the way, are you seeing a compile-time impact having /Qvc12 vs /Qvc14?  I would expect the switch to affect the Intel C/C++ compiler more than the Fortran compiler.

                Regards -

                                         --Lorri

0 Kudos
Highlighted
Beginner
57 Views

Davis, Kevin D wrote:

Thank you. Are there any options added under: Tools > Options > Intel Compilers and Tools > Visual Fortran > Compilers > Default Options (on the Win32 tab)?

Thanks for that hint! There was the following line defined in the Default options field:

/Qvc14 /Qlocation,link,"$(VCInstallDir)\bin"

Thank you for your Help!

Edit: In my opinion this option should be added to the Project Properties.

0 Kudos
Highlighted
Employee
57 Views

Glad we found it.

By adding it to Project Properties it becomes specific to the user's Project not the chosen compiler which is quite different functionality/scope and then it doesn’t seem to differentiate with the Project-only Additional Options setting.

0 Kudos
Highlighted
Beginner
57 Views

Well, I think it is similar to the Platform Toolset option in a C project. As I mentioned in my initial post, I am compiling a Lib which is used with a different Visual Studio version than 2015. But that's a matter of opinion.

But I'm happy there is a working solution!

0 Kudos