- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm just getting started after many years away from Fortran. I installed the compiler and tried to Build a couple of the Samples like WHIZZY and I get an error:
Error 1 fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt LINK
Sorry for the nubie question but I last used CVF probably 15 years ago and vaguely remember the visual part of the compiling and linking a Fortran program. I have a few old Fortran programs I wrote many years ago and I wanted to be able to make them work again with Win 7. Nothing fancy, just some number crunching to design some steel base plates (no graphics output).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are using Visual Studio 2010 - please install Service Pack 1 for VS2010. If you are using the bundled VS2010 Shell, you will then need to run vsshell2010sp1.msi, which you should find in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran folder. This was triggered by a Windows update.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifort setup assumes you have no link.exe on PATH other than the intended one. Assuming you have no old .obj files, this could be a problem; among the solutions are to set /Qlocation,link to point to the folder containing the correct version of Microsoft link.exe.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I did a search for *Link.exe and found the following files that were installed this morning by the setup program:
c:\Program Files (x86)\Intel\Composer XE 2015\bin\intel64\xilink.exe
c:\Program Files (x86)\Intel\Composer XE\bin\intel64\xilink.exe
c:\Program Files (x86)\Intel\Composer XE 2015\bin\ia32\xilink.exe
c:\Program Files (x86)\Intel\Composer XE\bin\ia32\xilink.exe
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\Bin\amd64\link.exe
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\Bin\link.exe
c:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\Bin\x86_amd64\link.exe
Is there a place in Tools->Options to set a path to one of these files? I did look over the readme for the WHIZZY and it said to add a couple of lines in the Tools-> Options but I still got the link error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are using Visual Studio 2010 - please install Service Pack 1 for VS2010. If you are using the bundled VS2010 Shell, you will then need to run vsshell2010sp1.msi, which you should find in the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran folder. This was triggered by a Windows update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
WOW, thanks for the tip. I did the install and ran the MSI and the compile works fine now.
On an unrelated note, is there a Home Use license for the Fortran compiler? I got the single user package for work but would like to install it on my home PC to play with it. We have home use installs for our Autodesk software and I was wondering if one was available for Fortran?
Also, is there a YouTube channel of something to show a rank beginner how to get up and running in the visual environment?
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't need a separate license, as long as you are the user. You can install on your home PC using the same serial number at no additional charge.
There isn't a YouTube channel, but check out https://software.intel.com/en-us/learn-to-be-fortran-power-user
There's also https://software.intel.com/en-us/articles/tutorial-introduction-to-intel-visual-fortran (download the ZIP and play it), but it's a bit out ofi date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the links. I'll check them out (lots of vacation to burn before end of year). I'll also try to figure out the best way to install the package at home. My home PC has a small SSD C: drive and a big D: drive where I like to keep the data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When installing you can customize the install location. Some files have to go on C, but the bulk of them can go on D. You could download the full installer to a USB stick and install it from there at home. You will need your serial number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got it installed at home and was trying to compile an old FOR program I wrote and a Console. The build returns no errors but when I try to run the program, there was no EXE created. I rebooted the PC and it still does not create a EXE to run from the Debug. I'm not sure how to get the compiler to produce the EXE file.
I opened a new Console project and then opened my FOR file in it. I did the build and got no warnings or errors but I can't see where I am going wrong. I uploaded the FOR code so maybe you can see if there is something so old in it that won't work.
Sorry to be a PITA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did it actually compile and link? You might have the problem described in Fortran sources are not compiled when I build my project in Visual Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I read and followed the directions in your link but the .for etc are in the list as it shows.
These are the files in the Project directory after I do a Build or Rebuild:
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\Debug\
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\Debug\BuildLog.htm
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest.suo
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\baseplatetest.u2d
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\baseplatetest.fdz
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest.sln
d:\Visual Studio 2010\Projects\baseplatetest\baseplatetest\baseplatetest.vfproj
There are no OBJ or EXE files created. I did do the SP1 update and ran the MSI that you sent in a previous answer.
I think the problem is I cannot figure out how to create a Console project and add in my basepl.for source code. I started a new project and then simply opened the FOR file in the big window where the source code goes. I did a screen shot of what it looks like.
I did open up a couple of the sample projects and was able to do a Build on them and run the EXE (the Poker worked) so I am sure I have things installed right. I just need to figure out how to add my source FOR code to the project so it will compile.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting a little further. I was able to start a new project and then drag my Source code into the Source Files Folder. I did a Build and it seemed to work and I was able to execute the program but it does not seem to work like it should. It should have opened a console window and asked me a question for the input, then continued to run and provide a solution. I can see a black box open and close and a MS Visual Studio dialog opens and says TEST.EXE has triggered a breakpoint. There is a green arrow in the source where I open my output file.
I copied the build log below.
Build Log
Build started: Project: test, Configuration: Debug|Win32 |
Output |
Deleting intermediate files and output files for project 'test', configuration 'Debug|Win32'. Compiling with Intel(R) Visual Fortran Compiler XE 15.0.1.148 [IA-32]... ifort /nologo /debug:full /Od /warn:interfaces /module:"Debug\\" /object:"Debug\\" /Fd"Debug\vc100.pdb" /traceback /check:bounds /check:stack /libs:dll /threads /dbglibs /c /Qvc10 /Qlocation,link,"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Intel Fortran\Microsoft Files\VC\\bin" "D:\Visual Studio 2010\Projects\BasePlate\BASEPLT.FOR" Linking... Link /OUT:"Debug\test.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"Debug\test.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"D:\Visual Studio 2010\Projects\BasePlate\test\test\Debug\test.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"D:\Visual Studio 2010\Projects\BasePlate\test\test\Debug\test.lib" "Debug\BASEPLT.obj" Link: executing 'link' Embedding manifest... mt.exe /nologo /outputresource:"D:\Visual Studio 2010\Projects\BasePlate\test\test\Debug\test.exe;#1" /manifest "Debug\test.exe.intermediate.manifest" test - 0 error(s), 0 warning(s) |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm thinking (and reading) that I probably need to add a Dialog Box to my code to allow the user to input my variables and then run the program. The XE 2015 we bought seems to include a Visual Studio Shell.
http://www.danysoft.com/free/Creating_Fortran_Win_Apps.pdf
This reference seems to say the Dialog Editor is not available in the Shell version. If this is true, how can I create a dialog box so the user can input the data?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're making it more complicated than it needs to be.
Create a Fortran console application. Right click on Source Files and select Add > Existing Item. Browse to your .for file and add it.
An alternative is File > New > Fortran Project from Existing Code.
Your program will open a console window and if the program reads from the default input (5 or *), the user will be able to type in the data. If you got a breakpoint, there was probably an error and you should look for the error message which may be in a window behind the Visual Studio window.
You don't need to get into dialog boxes at this time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve, you were right. I had grabbed an old FOR program that was written in the days of 8086 PC's that had 2 floppy drives, no HDD, and booted to an early Netware network where we had a partition that acted like a HDD. I was trying to Open a file on B:.
I grabbed a later file where I had the user supply the filename for output and it Built fine. I do eventually want to find out how to use a Dialog Box to input the data and it would be really nice to be able to draw the 12 sided pole shaft and the holes for the bolts.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page