Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anything I should know before converting a large C++ program from VS2005 to VS2008?

Is there anything I should know before converting a large C++ program from VS2005 to VS2008?

like image 687
Brian R. Bondy Avatar asked Oct 28 '08 13:10

Brian R. Bondy


2 Answers

I'm working on this very problem right now.

Running WinMerge to see what I've changed...

OK, here is what I had to fix in an huge Win32/MFC client application:

Some MFC functions have become virtual (which were not in the past - CWnd::GetMenu for one, if I recall correctly). Also something related to our legacy mouse wheel support (before Windows had built-in mouse wheel support) somehow broke (I just removed the feature, so I never really figured out why that broke).

Some ATL methods (or method params) have changed to const that were not originally (screwed up my overrides).

The Platform SDK is newer - be careful if you're setting the windows SDK version #defines correctly (we were not in all places - which was dumb). You may now be building with newer versions (Vista/2008) of Win32 structures. This didn't work so great on my XP box.

STDMETHOD now includes __declspec(nothrow) which is 100% right - except this found some problems in our code. Some interface that was written like it would be exposed through COM, but never was, threw exceptions.

The IDE has a bug where disabled breakpoints don't show the hollow circle in the margin if you don't have the break points set to highlight the whole line (which I think is the default for VC++, maybe?).

Most of these issues were due to subtle mistakes in our code or aggressive overloading of MFC/ATL libraries. Since everyone else's code is perfect, you should be fine ;)

like image 98
Aardvark Avatar answered Oct 04 '22 06:10

Aardvark


At my work we converted a large C++ project from VS2005 to VS2008. There were no issues at all. Needless to say, you should definitely still keep a copy of the old project just in case. :)

Edit: I should have mentioned that the project is meant to be platform-independent, and has no gui components.

like image 35
Dima Avatar answered Oct 04 '22 08:10

Dima