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

Unable to compile and build a fortran program

John_S_16
Beginner
3,709 Views

I have just reinstalled my Visual Fortran - Professional addition version 10 on my machine. Unfortunately, I am getting repeatedly an error code: PRJ0019: "A tool returned and error code: upon compiling/build a program.

In order to find out what is going on, I have looked at the file fortran configuration properties. This is what I get for all categories under Configuration Properties/Fortran: See attached file.

0 Kudos
16 Replies
Steve_Lionel
Honored Contributor III
3,709 Views

Version 10 is rather old at this time. First thing to do is to look at the buildlog.htm to see which tool was being invoked when this error occurred. No file was attached to your post.

Did you install Visual Studio separately, or use the included VS2005 Premier Partner Edition? I'll comment that VS2005 doesn't work well on Windows Vista or later - at one time Microsoft offered an update that would help with compatibility, but it seems to be gone now.

0 Kudos
John_S_16
Beginner
3,709 Views

Buildlog.htm is given below. ------

 

Build started: Project: log_diff, Configuration: Debug|Win32 ------ Compiling with Intel(R) Fortran Compiler 10.0.025 [IA-32]... ifort /nologo /Zi /Od /gen-interfaces /warn:interfaces /module:"Debug\\" /object:"Debug\\" /traceback /check:bounds /libs:qwin /dbglibs /c /Qvc8 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin" "C:\Users\Dr Sullivan\Documents\Visual Studio 2005\My Projects\wkarea\log_diff\LDE_2.F90" Linking... Link /OUT:"Debug\log_diff.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\Users\Dr Sullivan\Documents\Visual Studio 2005\My Projects\wkarea\log_diff\log_diff\debug\log_diff.exe.intermediate.manifest" /DEBUG /PDB:"C:\Users\Dr Sullivan\Documents\Visual Studio 2005\My Projects\wkarea\log_diff\log_diff\debug\log_diff.pdb" /SUBSYSTEM:WINDOWS "Debug\LDE_2.obj" "Debug\PLOT_window.obj" Link: executing 'link' Embedding manifest... mt.exe /nologo /outputresource:"C:\Users\Dr Sullivan\Documents\Visual Studio 2005\My Projects\wkarea\log_diff\log_diff\debug\log_diff.exe;#1" /manifest "C:\Users\Dr Sullivan\Documents\Visual Studio 2005\My Projects\wkarea\log_diff\log_diff\debug\log_diff.exe.intermediate.manifest" log_diff : error PRJ0019: A tool returned an error code log_diff - 1 error(s), 0 warning(s

0 Kudos
John_S_16
Beginner
3,709 Views

Another bit of information is:

When I type in the command window    ifort lde_2.f90, I get the message that the command ifort is not valid

0 Kudos
Steve_Lionel
Honored Contributor III
3,709 Views

Ok, it's the manifest tool that is the problem - I've seen this a lot over the years. The manifest tool (mt.exe) is a Microsoft tool that runs after the linker and embeds the "application manifest" into the executable. 

The most common cause of this error is antivirus tools that do a scan of any newly created EXE to make sure it doesn't have a virus. This locks the file and prevents mt.exe from working. The usual solution to that is to tell your AV tool not to scan your project folders.

If this doesn't help, set the project property Linker > Manifest > Generate Manifest to No. Since the default in that version was to link statically, a manifest adds no value.

As for the ifort command line issue, you must open a "Fortran command window environment" window from the shortcuts added under Intel Visual Fortran in the Start menu.

0 Kudos
John_S_16
Beginner
3,709 Views

Steve,

I have attached a screen shot of a file that I am using to figure this problem out. In the shot, you see listed under file properties/fortran/data the commands in the right window. This set of commands appear in all subs under fortran, and not options to make changes are available.

A similar situation occurs under the linker, accept a different set of command are listed.

My Visual fortran is "Intel Visual Fortran Compiler - Professional Edition for Windows - version 10. With the exception of the IMSL library I have loaded the whole system on my machine.

I apologize to the on again / off again response with you on this problem. But work keep dragging me off in other directions.

Your suggestions and comments appreciated.

John S

0 Kudos
Steve_Lionel
Honored Contributor III
3,709 Views

Unfortunately, that screen shot doesn't provide any information useful to the problems you described. What you showed was the set of compile options used in Visual Studio to compile Fortran sources, but you haven't mentioned any issues with such compilations.

You mentioned two problems, 1) the Microsoft Manifest Tool failing, 2) not being able to use the ifort command from the command line.

I suggest that you reread my reply #5.

0 Kudos
John_S_16
Beginner
3,709 Views

As you requested  in reply #5, I set my virus program to ignore my fortran folders. Nevertheless, I still have limited use of the MS VS fortran. Below are two curious problems that I am currently dealing with.

1. When attempting to create a new program, the system does not light up the build icons. Hence, I cannot actually create a new program.

2. For existing programs, I can edit and successfully compile and build the program (solution). I nevertheless, get the follow error message: "error PRJ0019: A tool returned and error code"

3. Whether for an existing program and my attempted new program, set options under Configuration Properties/fortran or /linker are simply not listed there.

John

0 Kudos
jimdempseyatthecove
Honored Contributor III
3,709 Views

>>1. When attempting to create a new program, the system does not light up the build icons. Hence, I cannot actually create a new program.

When you wish to create a program in MS Visual Studio, you must first create a Project (or new Solution with first Project), and declare that the project type is that of a program/execuitable. (Console or other from template). Simply clicking on: File | New is insufficient to establish a buildable program.

>>2. For existing programs...

This can be a Manifest error (Steve's post) or possibly a Resource Compiler error. Look at the Build Log for additional information.

>> 3. Whether for an existing program and my attempted new program, set options under Configuration Properties/fortran or /linker are simply not listed there.

This seems to indicate that the Project file is incorrect (not specifying a Fortran project), ... or possibly you opened a Project created with a much earlier version of MS VS and either failed to update it as requested (or MS VS could not recognize the Project file format, which should have resulted in an error message). Or, the installation failed to fully integrate Intel Fortran into MS VS. In this case I suggest uninstalling Intel Fortran, then re-installing it by Right-Clicking on the ...setup.exe and choosing Run As Administrator.

Additional note, IVF Version 10 is old (Steve's post), it is likely much older than MS VS and thus integration may be difficult.

Jim Dempsey

 

0 Kudos
John_S_16
Beginner
3,709 Views

Jim

I fear that my version of MSVS intel fortran is incompatible with my system, perhaps too old. I did as you suggested, uninstalled and reinstalled everything as an administrator. No improvement.

Also, I am still unable to create a new program. First, I define an empty project via New>project>quick win app or >visual studio app. and then add in a *.f90 file, and still end up with build icons not available.

Further, in the past when I opened up an existing solution, the code was displace and to the right was the resources panel. This does not happen anymore. 

What would it take to update my visual fortran. Can I update it or do I buy an expensive whole new package?

John S

 

 

0 Kudos
gib
New Contributor II
3,709 Views

Have you tried to create a new project as:

Intel Visual Fortran > Console Application

?

By the way, you can change what is displayed by clicking the "View" button at the top and selecting what you want to see.

0 Kudos
Steve_Lionel
Honored Contributor III
3,709 Views

Please do Help > About in Visual Studio. Click Copy Info and paste the results into a reply here.

If you are still using version 10, you'd need to buy the full new version. See here for which Visual Studio versions are compatible with which Intel Fortran versions.

0 Kudos
John_S_16
Beginner
3,709 Views

Steven,

It appears that I need to get a new version of visual studio. I have a few questions about which one.

1. If some of the problems that I have been dealing with are due to Windows 10 OS, which visual studio should I get given the my machine's OS is Windows 10?

2. Is my Intel Visual Fortran 10.0 compatible with the new visual studio that I would purchase?

3. An alternative option for me would be to resurrect an old computer laying around, install Windows 7 (which I still have the DVDs for), and finally install my visual studio with intel fortran. Is there a reason that would not work?

John S.

0 Kudos
andrew_4619
Honored Contributor III
3,709 Views

Well the only VS you can purchase is 2017 you can google Visual Studio community which is the same but free if you qualify. As to compatibility no VS release from the last 10 years will work with fortran 10 which is ancient. Intel Foran usually supports three releases of VS so the current support VS2013, 2015 and 2017.  I would suggest upgrading your fortran is what would need to do.

 

 

0 Kudos
Steve_Lionel
Honored Contributor III
3,709 Views

I agree with Andrew. Click the "here" link in my post 13 for a compatibility reference. For Windows 10, VS2010 or later would be recommended, but as Andrew says, VS2017 is the current. If you do Fortran-only development, Intel Parallel Studio XE Composer Edition for Fortran Windows (the least expensive product to include Intel Visual Fortran) includes a VS2015-based Fortran development environment so you would not need to buy VS in addition. Alternatively, the VS2017 Community Edition is free for many users - just be sure to customize the install and select C++ under Languages.

0 Kudos
nganga__Stanley
Beginner
3,709 Views

How can I get a DIGITAL FORTRAN COMPILER that will enable me to compile a user defined RT3D code that will run in GMS (Groundwater Modeling System) version 10.4 64bit model?\

The intel visual fortran compiler all versions are not able to produce a DLL compatible to the GMS RT3D.

Thank you.

0 Kudos
Steve_Lionel
Honored Contributor III
3,709 Views

You don't know that it's "not compatible", only that it is not working for you.

Digital Visual Fortran has been off the market since 2004 (and never supported 64-bit systems.)

0 Kudos
Reply