Upgraded to Visual Studio 2010

Upgraded to Visual Studio 2010

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

79 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Update - I've found the Watch Window, but not fow to edit the dialogs.

With full VS2010, and the Visual C++ component installed, you should be able to edit dialogs. You're sure you're in the VS2010 environment? Did you do a default install of VS2010 before installing Intel Fortran?

Steve - Intel Developer Support

I didn't install Visual C++ (I did install Visual Basic).
Is all I need to do is add Visusal C++?
David

Yes - you should have received a warning when you installed Fortran if it did not find Visual C++. I suggest that you uninstall Fortran, install the Visual C++ component, then reinstall Fortran.

Steve - Intel Developer Support

Thanks,
I removed Visual Fortran, installed C++ for Visusal Sudio 2010 and reinstalled Visual Fortran 2011.

Where do I edit the dialogs?

Should I have upgraded my Visual Fortran project again?

David

You should be able to just double-click on the .rc file and that should bring up the resource editor.

Steve - Intel Developer Support

When I double click on the rc file I get the mesage "fatal error RC1015: cannot open include file 'windows.h'"

Previously when I used Vuisual Studio 2008 Express I had to use ResEdit to edit the dialogs.
I wonder if the format of the rc file is slightly different.

The problem now is that the folder containing the Windows SDK .h files is not in the Includes path. This ought to have been set up when Visual C++ got installed, but some customers find it didn't. Maybe the order in which you did the install contributed to the problem.

Find the folder on your system containing windows.h. It is possibly C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\ Add this to the list in Tools > Options > Intel Visual Fortran > Compilers > Includes.

Steve - Intel Developer Support

The include files are:
$(IFortInstallDir)compiler\include
$(IFortInstallDir)compiler\include\ia32
$(IFortInstallDir)mkl\include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)include
$(WindowsSdkDir)include
$(FrameworkSDKDir)include

The .h files are in
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A

I'm not sure what I actually add.

It's the $(WindowsSdkDir) definition which is the problem. It comes from a registry entry which may not be correct. You can look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows to see if CurrentInstallDir matches what you found above. It should. Otherwise, just add that folder to the list for Includes.

Steve - Intel Developer Support

Sorry, I've tried various combinations but still cannot get it to work.
I'm worried incase I mess someting up.

The registry entry is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
has c:\program Files\Microsoft SDKs\Windows\v7.1
There are also directores for v6.0A, v7.0A & v7.1, they contain
c:\program Files\Microsoft SDKs\Windows\v6.0A
c:\program Files\Microsoft SDKs\Windows\v7.0A and
c:\program Files\Microsoft SDKs\Windows\v7.1 respectively

The project properties compile includes are:

$(IFortInstallDir)compiler\include
$(IFortInstallDir)compiler\include\ia32
$(IFortInstallDir)mkl\include
$(VCInstallDir)atlmfc\include
$(VCInstallDir)include
$(WindowsSdkDir)include
$(FrameworkSDKDir)include

The windows.h is in:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include

and also at

C:\Program Files\Microsoft SDKs\Windows\v7.1\Include

Maybe the registry entries should be "Program Files (x86)" rather than "Program Files".

The different versions of the SDK install in different places. Just put:

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

in the Includes list in Visual Studio.

Steve - Intel Developer Support

I have tried that and I still get the same error.

Where do you get the error? When you try to open the resource file? This suggests to me that the registry entry for the Windows SDK is incorrect.

Steve - Intel Developer Support

I get the error when I double click in the .rc file.
I gave the registry entries in a previous reply - but there are several - local machine, current machine and different versions.

What do you have in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows (if you are on an x64 system)?

What about HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows ?

Steve - Intel Developer Support

Here are the entries of the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows

C:Program Files\Microsoft SDKs\Windows\v7.1\

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows

C:Program Files\Microsoft SDKs\Windows\v7.1\

There should be four values under that key, (Default), CurrentInstallFolder, CurrentVersion and ProductVersion.

You could try this. Uninstall Fortran. Do a "Repair" on VS2010 from Programs and Features, then reinstall Fortran. Or you can download and install a recent Windows SDK which might correct the problem.

Steve - Intel Developer Support

Yes there are 4 values:
for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows:
Default - not set
CurrentInstallFolder : c:\programfiles\Microsoft SDKs\Windows\v7.1\
Current Version : v7.1
Product version : v6.0A

for HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows:
it is the same.

I will reinstall Fortran tomorrow unless you suggest otherwise.
Thanks

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.

Steve - Intel Developer Support

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

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.

Steve - Intel Developer Support

Sorry, that didn't work, still the same error.

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.

Steve - Intel Developer Support

I now get the error"cannot open include file 'sdkddkver.h'"

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).

Steve - Intel Developer Support

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...

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.

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.

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.

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'

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.

Very puzzled. Please install the most recent Windows SDK from the link I posted earlier and see if that helps.

Steve - Intel Developer Support

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...

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.

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).

Steve - Intel Developer Support

I have added the files

I have added the files

Thanks, I'll see what I can figure out.

Steve - Intel Developer Support

Steve have you had a chance to look at this?

Sorry, my system was giving me trouble last week. I also need the .h file generated by resedit.

Steve - Intel Developer Support

No problem, I'm busy doing other things but I didn't want thisproblem to be lost.
Thanks, I've attached the file.

Ok, this is progress.

First, I can also see the issue you had with windows.h - I am investigating that on the side.

The main problem here is that the resource editor doesn't like including windows.h, which pulls in a LOT of things, apparently some with symbols longer than it likes. Please replace the series of #include lines in grade.rc with:

#include "afxres.h"

and see if that's better.

Steve - Intel Developer Support

Steve,
THanks, replacing the #includes with #include "afxres.h" looks better.
I now get the error "RC2104: undefined keyword or key name IDM_DBASE_ACTIVATE".
I'm not sure why, as it's in grade.rc, in resource.fd resource.h and in the code.

Did you also remove the #include of resource.h? Put it back. Sorry, I was not clearer in my earlier post.

Steve - Intel Developer Support

The start of the .rc file now looks like this:

// Generated by ResEdit 1.5.11

// Copyright (C) 2006-2012

// http://www.resedit.net

#include "afxres.h"

#include "richedit.h"

#include "commctrl.h"

#include "resource.h"

When I double click on the file it gaves the same error as in post #36.

Remove these lines:

#include "richedit.h"

#include "commctrl.h"

Steve - Intel Developer Support

I now get tghe error:

"error RC2104 : undefined keyword or key name: WC_STATIC"

The start of the .rc now looks like this:

// Generated by ResEdit 1.5.11

// Copyright (C) 2006-2012

// http://www.resedit.net

#include "afxres.h"

#include "resource.h"

Urg. Add back in the #include of commctrl.h

Or add this:

#define WC_STATIC "Static"

Steve - Intel Developer Support

Pages

Leave a Comment

Please sign in to add a comment. Not a member? Join today