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

Problems with debugging on Win7

kostas_k
Beginner
1,335 Views
Hi all!

I recently switched from Compaq Visual Fortran to Intel Visual Fortran when I bought a Win7, 64-bit pc. I've been having some problems with debugging in IVF though:

After converting a CVF project to an IVF solution, following the instructions from here, I tried to debug my code by pressing the green "play" button (in x64 mode). This gave me the message "Unable to start program 'C:/.../[my_program's_name].exe'. The system cannot find the file specified."

I believe this is a commonly encountered issue, yet I haven't found a clear solution to it yet, so I'd really appreciate any help with this.

Cheers!
0 Kudos
14 Replies
jimdempseyatthecove
Honored Contributor III
1,335 Views
Does Rebuild All rebuild your application?

If so, where does it place the .exe file?

Note, it is not all that unusual for the project settings to default to the x32 builds after conversion. Check to see if the x64 build is selected (add if necessary).

Jim Dempsey
0 Kudos
kostas_k
Beginner
1,335 Views
The .exe is supposed to be created in [path of the .sln file]/x64/debug, and this is where the debugger is looking for it, but there is nothing in there, even though the build appears to complete succesfully. Furthermore, I can't find the corresponding .exe anywhere else in my hard drive. Strange stuff...
0 Kudos
mecej4
Honored Contributor III
1,335 Views
As a check on the viability of your installation, please try creating a small program from scratch. If you can build and debug it, we shall know that your installation is OK. Then we can look at the CVF to IVF project conversion process.
0 Kudos
Steven_L_Intel1
Employee
1,335 Views
Did the program build correctly? If it did not build at all, check out the tips given in this article - in particular, the fourth bullet in step 1.
0 Kudos
kostas_k
Beginner
1,335 Views
Ok, the advice of you both was solid.

I followed the procedure from the link Steve posted. After doing what the 4th bullet of the 1st step suggested the program actually started checking for errors, and I get the build error "fatal error LNK1104: cannot open file 'LIBCMTD.lib'". After going through the rest of the checklist and finally running the VS2010 Repair Tool succesfully, I still get the same error message "Unable to start program, etc."

I also tried compiling a standard "Hello world" program and I get the exact same errors.

Any ideas what might be wrong? Maybe there's something wrong with the installation?

I'm currently trying to contact support as suggested in the final step of Steve's link, but I get the error message "We were unable to authenticate your access to the Intel Premier Support web site". Do I need to have purchased the program to be able to contact support? Either way, I'll send them an e-mail and see what they have to say...
0 Kudos
Steven_L_Intel1
Employee
1,335 Views
If you have not purchased the product, are you using a trial version? Which edition of Visual Studio 2010 do you have installed? You can create a support account by re-registering the serial number and checking the box to request a support account.

The error about LIBCMTD indicates that the Microsoft Visual C++ libraries cannot be found - these are installed as part of VS2010.

In VS, select Tools > Options > Intel Visual Fortran > Compilers. Select the x64 tab. Click on the ... button to the right of Libraries. The list should look like this:

$(IFortInstallDir)compiler\lib\Intel64
$(IFortInstallDir)mkl\lib\Intel64
$(VCInstallDir)atlmfc\lib\amd64
$(VCInstallDir)lib\amd64
$(WindowsSdkDir)lib\x64

Does it? Does the folder C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib\amd64 exist? (I assume you are trying to build an x64 configuration, if a "Win32" configuration, then the list will be similar but without the "x64" or "amd64" or Intel64 suffixes.)
0 Kudos
kostas_k
Beginner
1,335 Views
Thanks for the quick reply!

The list of libraries does look as you describe.

I can't find a C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/lib/amd64 folder. There is a C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/amd64 folder though.
0 Kudos
Steven_L_Intel1
Employee
1,335 Views
Which edition of Visual Studio 2010 did you install? The missing lib\amd64 folder is key to your problem.
0 Kudos
kostas_k
Beginner
1,335 Views
The installed version is:

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel

0 Kudos
Steven_L_Intel1
Employee
1,335 Views
That doesn't tell me the edition. In VS, select Help > About. Click Copy Info and paste the results here.
0 Kudos
kostas_k
Beginner
1,335 Views
Sorry about that.

Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework
Version 4.0.30319 SP1Rel

Installed Version: Professional

Microsoft Office Developer Tools 01018-169-2660007-70356
Microsoft Office Developer Tools

Microsoft Visual Basic 2010 01018-169-2660007-70356
Microsoft Visual Basic 2010

Microsoft Visual C# 2010 01018-169-2660007-70356
Microsoft Visual C# 2010

Microsoft Visual C++ 2010 01018-169-2660007-70356
Microsoft Visual C++ 2010

Microsoft Visual F# 2010 01018-169-2660007-70356
Microsoft Visual F# 2010

Microsoft Visual Studio 2010 Team Explorer 01018-169-2660007-70356
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010 01018-169-2660007-70356
Microsoft Visual Web Developer 2010

Crystal Reports Templates for Microsoft Visual Studio 2010
Crystal Reports Templates for Microsoft Visual Studio 2010

Intel Visual Fortran
Intel Visual Fortran Composer XE 2011 Integration for Microsoft Visual Studio* 2010, 12.0.3470.2010, Copyright (C) 2002-2010 Intel Corporation
* Other names and brands may be claimed as the property of others.

Microsoft Visual Studio 2010 Professional - ENU Service Pack 1 (KB983509) KB983509
This service pack is for Microsoft Visual Studio 2010 Professional - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/983509.

Microsoft Visual Studio 2010 SharePoint Developer Tools 10.0.40219
Microsoft Visual Studio 2010 SharePoint Developer Tools

Silverfrost FTN95 Version 2.0.0.0
Silverfrost FTN95 for Microsoft Visual Studio .NET
0 Kudos
Steven_L_Intel1
Employee
1,335 Views
Ok - you ought to have the lib\amd64 folder. Try doing a "repair" on VS. I see you have SP1 installed, but so do I and I have the folder. You might also do a "Modify" and make sure that "x64 compiler and tools" is selected under Visual C++.

I will comment that, historically, having two Fortran products integrated into VS has caused problems. This is certainly not relevant to the linking issue, but if you find other oddities you may want to consider uninstalling Silverfrost.
0 Kudos
kostas_k
Beginner
1,335 Views
OMG, it worked! Thanks Steve!

To sum it up, what I had to do was follow the fourth bullet point of the first step from this article, remove some default option from Project->Properties->Linker->Command Line->Additional Options that forced the compiler to run in x86 mode (or something to that effect) and then run a "Modify" installation making sure that the "x64 compiler and tools" box under Visual C++ was ticked.
0 Kudos
Steven_L_Intel1
Employee
1,335 Views
Glad to hear it. Puzzling that the files were not installed, as they are by default (and you had the bin folder), but...

And yes, projects converted from CVF often need to have the linker switch /machine removed.

Let us know if we can be of further assistance.
0 Kudos
Reply