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

Upgraded to Visual Studio 2010

davidgraham
Beginner
4,004 Views
I've just updated to Visual Studio 2010 Full, before I was on Visual Studio 2008 shell.

With Visual Studio 2008 shell I had to use the program 'ResEdit' to edit the resouce file - to edit the dialogs etc.
With Visusal Studio 2010 full I should be able to edit the dialogs directly - how do I do this, back in VF6.6 there was a resource tab.

Also how do I get the watch window to be displayed when debugging - I can't see anything that looks like it, just an 'immediate' window.

I'm sure the answers are simple its just getting used to the new terminology.

Thanks
David
0 Kudos
79 Replies
Steven_L_Intel1
Employee
712 Views
Try installing the SDK. It's not Fortran that defines these entries. I am not sure what causes the current and product versions to be different here.
0 Kudos
davidgraham
Beginner
712 Views
I ran the SDK repair option but it has not solved the problem.

In tools|options|IVF|Compilers|Libraries I have the following - I have tried to include all references to window.h but am not sure if the syntax is correct.

$(IFortInstallDir)compiler\include
$(IFortInstallDir)compiler\include\ia32
$(IFortInstallDir)mkl\include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)include
$(WindowsSdkDir)include
$(FrameworkSDKDir)include
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include
C:\Program Files\Microsoft SDKs\Windows\v7.1
C:\Program Files\Microsoft SDKs\Windows\v7.1\include
0 Kudos
Steven_L_Intel1
Employee
712 Views
Ok, big hammer time. Add the following to your system environment variables:

WINDOWSSDKDIR
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\

Be sure to include the trailing slash.

To edit environment variables, right click on Computer, select Properties. Click on Advanced System Settings, then the Advanced tap, then Environment Variables. Create a new system variable as above. Log out and in again.

I've been playing with my system to see if I can understand how $(WindowsSdkDir) gets defined by VS, but haven't figured it out.
0 Kudos
davidgraham
Beginner
712 Views
Sorry, that didn't work, still the same error.
0 Kudos
Steven_L_Intel1
Employee
712 Views
What happens if you copy windows.h into the same folder as the .rc file? There must be something else odd going on here I'm not seeing.
0 Kudos
davidgraham
Beginner
712 Views
I now get the error"cannot open include file 'sdkddkver.h'"
0 Kudos
Steven_L_Intel1
Employee
712 Views
Let's try this. Look at the instructions for VS2010 in this article. However, instead of updating Library Files, add the complete path to where the .h files are to the Include Files list for C++. I'm convinced that the issue has to do with the use of $(WindowsSdkDir).
0 Kudos
IanH
Honored Contributor II
712 Views
Fascinating. I've just added a single line (#include "windows.h") rc file to a random ifort project then double clicked on it, and guess what error I get... Same if I add a new rc file to an brand new ifort project.

But from within VC++ projects and at the ifort command line I have no such problems.

After a spot of breakfast I shall investigate further...

0 Kudos
IanH
Honored Contributor II
712 Views
On a relatively fresh XP VM with ifort 12.1.5 on top of VS2010 professional, things work (my test is simply to try and create a project using ifort's Windowing Application > Dialog Code template).

On a Vista machine, with a colourful history of installations and removals, the same test fails - when the integration tries to compile the rc file as part of the project creation process (presumably so that it can add the resource view) it complains about missing include files (winres.h). Bizarrely it will quite happily compile the rc file if I right click on it and select "compile".

On that same machine I can happily create a new VC++ project that has resources as part of the project template without any problems.

I have tried starting devenv from a command prompt that already has INCLUDE set to cover the relevant directories, but that doesn't seem to change the outcome.

Does the integration use rc.exe to do that initial compile - or is it a DLL-ised variant of the rc code? If the former, then i'll subvert the rc executable with a nefarious exe of my own design and see what the command line and environment is when it is invoked.

0 Kudos
davidgraham
Beginner
712 Views
I the tried following the instructions.

I don't have a C++ project (I have never used C++)- so I have created a 'test' C++ project.
In the Property Manager under Debug Win32 there are 4 entries:
C++ Safe MSIL Common Language Runtime Support
Windows Dynamic Link Library
Unicode Support
Core Windows Libraries

This doesn't agree with step 3 in the instructions whereit says to double colick on Microsoft.cpp.Win32user.
0 Kudos
IanH
Honored Contributor II
712 Views
You lost me.

To test whether resources can be edited within a VC++ project start VS 2010. Choose File > New > Project. Expand the Visual C++ group under Installed templates, choose the Win32 sub-category and then select Win32 Project. Give the project a name in the Name entry field below the project type selection area, click Ok.

The Win32 Application Wizard should be displayed. Accept all default settings by clicking Finish. If you don't subsequently get any errors then it is working. To confirm, when the new solution has finished loading select View > Resource View. In the resulting pane expand the item corresponding to the new solution, then expand the item corresponding to the the name of the automatically created rc file for the project, then expand one of the resource categories (say the dialog category) and then double click on one of the child resource entries. Admire the resource in its special editor. If it is the "About" dialog you double clicked on then you could move dialog controls around...

To test whether resources can be edited using ifort I followed a similar process, but I expanded the Intel Visual Fortran group in the list of installed templates, selected the Windowing Application subcategory then chose Dialog Code. After clicking Ok (accepting the default project name) I get the pop-up that says the resource compiler has choked big time - and no resource view.

It doesn't appear that rc.exe is actually being invoked to create the binary representation of the rc file necessary for the resource view, so I was unable to diagnose further.

0 Kudos
davidgraham
Beginner
712 Views
Ian,
I hadn't created the correct type of C++ project (I have never used C++).
When I follow your steps I can create a C++ project and editthe resources.

When I create a IVF project I get the message:
C:\users\DavidG\documens\visusl studio 2010\
Projects\WinApp2\WinApp2\WinAp2.rc(2)

Fatal error RC1015: cannot open includefile 'winres.h'
0 Kudos
davidgraham
Beginner
712 Views
Steve,
After creating the correct type of C++ project I followed the steps in the article you gavebut I'm still getting the same error when I double click on the .rc file.
0 Kudos
Steven_L_Intel1
Employee
712 Views
Very puzzled. Please install the most recent Windows SDK from the link I posted earlier and see if that helps.
0 Kudos
IanH
Honored Contributor II
712 Views
Ok - that situation (VC++ resource editing works, ifort resource editing doesn't) is exactly what I get on my vista laptop. So you are not alone...
0 Kudos
davidgraham
Beginner
712 Views
I had reinstalled SDKs before, Ihad ran the repair, so this time I unistalled and tried to install but I got an error in install.
Therefore I repaired the VisualStudio 2010 install.
Now when I double click on the .rc file I get
"C:\Program Files (x86)\Microsuft SDKs\Windows\7.0A\ionclude\prsht(0)
error RC2247 : SYMBOL name too long."

At least it is not saying it cannot find the files.
0 Kudos
Steven_L_Intel1
Employee
712 Views
The repair seems to have helped a lot. But the error you now get is rather strange. Would you please copy and paste the actual error rather than retyping it (as you apparently did)? Also please attach the .rc file you are using (ZIP it first).
0 Kudos
davidgraham
Beginner
712 Views
I have added the files
0 Kudos
davidgraham
Beginner
712 Views
I have added the files
0 Kudos
Steven_L_Intel1
Employee
725 Views
Thanks, I'll see what I can figure out.
0 Kudos
davidgraham
Beginner
725 Views
Steve have you had a chance to look at this?
0 Kudos
Reply