You are here:

C++/Problem upgrading to MS VC++8 Express Edition


Hi Ralph,

As per your suggestion, I've upgraded from VC++6 and downloaded MS VisualC++8, but have a problem.

Initially I tried to build one of my old programs with VC++8 but the build failed because of a missing file: afxwin.h.

I then found and went to 'File | New | Project from existing code' and tried to build the project but again had a failure do to the missing afxwin.h.

Rebuilding this program from scratch will be very time consuming as it is a huge program.

What do you suggest I do?

Thank you,

Firstly if you are the Neil who asked about localising displayed number formats then as far as I can see I did not advise you to upgrade to MSVC++ 2005 or later compiler . I mentioned in that answer that I had not used C++ standard library locales with MSVC++ 6.0 and that I had tried the presented code fragments using MSVC++ 8.0 (a.k.a 2005). However I do not see anywhere where I explicitly suggest that you upgrade to MSVC++ 8.0 or later. (Note: if you are some other questioner, or you are taking advice from another question then I am sorry but I do not know which answer you are referring to and thus I am unsure what exactly I advised).

I do not in general advise MSVC++ 6.0 users to upgrade because I know that many people are stuck using large MSVC++ 6.0 codebases, that MSVC++ 6.0 has an old but adequate standard library implementation (and upgrades from Dinkumware are - or were - available) and that your question suggested you were doing more than just course assignments.

I do from time to time suggest people consider updating their compiler. This tends to be when I suspect (or know) they are using a really ancient compiler that pre-dates the ISO C++ standard and has no standard C++ library implementation (for some reason Turbo C++ 3.0 released around 1991 is still quite popular in some places). Even then I am aware that doing so may not be a feasible option in all cases, hence I merely suggest they consider such a change.

When changing the tools used in any non-trivial project you have to plan the changes, maybe treating it like a mini-port to a new platform. I know one company that took weeks (maybe months) to make their MSVC++ 6.0 codebase MSVC++ 7.1 (.NET 2003) compliant. Only once those involved with the update 'porting' work had finished were other MS Windows developers and main stream development moved from MSVC++ 6.0 to 7.1.

However your immediate problem in this case is probably somewhat more fundamental. The free express edition of Microsoft Visual C++ 2005 (and the new 2008 version) does not include the Microsoft specific libraries - MFC and ATL. Nor does it include the (full) platform SDK which has to be downloaded and installed separately (this may have changed for the new 2008 edition). To get access to MFC, ATL, 64-bit compilers etc. you have to buy licences for higher end versions of Visual C++.

The other reason (i.e. you are not using the free express edition) could be that the include paths are not set up correctly - check out the global options dialog menu option (Tools -> Options), under the Projects and Solutions -> VC++ Directories section. Whilst checking the include files paths check out the library files paths as well.

For a comparison of Visual C++ 2005 features see the table in the MSDN library article "Visual C++ Editions" at:

For the equivalent table for the new Visual C++ 2008 editions see:

You will also notice that the express editions lack a resource editor, which makes GUI work tedious to say the least.

Note that if you obtain (or are thinking of obtaining) one of the other Microsoft Visual C++ 2005 (or 2008) editions then you should read carefully the information on changes and upgrading. You might like to start with the sections under:

   Development Tool and Languages > Visual Studio > Visual C++ > Getting Started > Previous Product Changes
   Development Tool and Languages > Visual Studio > Visual C++ > Porting and Upgrading
or similar paths in the MSDN library documentation (the above documentation paths are taken from my somewhat out of date local MSDN library installation).

The online MSDN references (for MSVC++ 2005) are:

The other obvious class of problem you may very well run into is core C++ language implementation differences. Microsoft has been improving their compilers and so bad code that might previously have compiled may not do so anymore. Also of course good code that previously compiled may not do so if you happen to bump into a compiler bug!

As to re-building the whole application. Well you would have to do that to compile and link everything using the new tools etc. You should _not_ have to re-write the whole application however, only update those parts that need it. That is re-building means compile and link everything in full, often this is the same as a clean (of all targets and intermediate files) followed by a build.

Note: MSDN online references correct at time of writing as far as I know but may change over time.

Hope this helps - even if it not really what you wanted to know - sorry.  


All Answers

Answers by Expert:

Ask Experts


Ralph McArdell


I am a software developer with more than 15 years C++ experience and over 25 years experience developing a wide variety of applications for Windows NT/2000/XP, UNIX, Linux and other platforms. I can help with basic to advanced C++, C (although I do not write just-C much if at all these days so maybe ask in the C section about purely C matters), software development and many platform specific and system development problems.


My career started in the mid 1980s working as a batch process operator for the now defunct Inner London Education Authority, working on Prime mini computers. I then moved into the role of Programmer / Analyst, also on the Primes, then into technical support and finally into the micro computing section, using a variety of 16 and 8 bit machines. Following the demise of the ILEA I worked for a small company, now gone, called Hodos. I worked on a part task train simulator using C and the Intel DVI (Digital Video Interactive) - the hardware based predecessor to Indeo. Other projects included a CGI based train simulator (different goals to the first), and various other projects in C and Visual Basic (er, version 1 that is). When Hodos went into receivership I went freelance and finally managed to start working in C++. I initially had contracts working on train simulators (surprise) and multimedia - I worked on many of the Dorling Kindersley CD-ROM titles and wrote the screensaver games for the Wallace and Gromit Cracking Animator CD. My more recent contracts have been more traditionally IT based, working predominately in C++ on MS Windows NT, 2000. XP, Linux and UN*X. These projects have had wide ranging additional skill sets including system analysis and design, databases and SQL in various guises, C#, client server and remoting, cross porting applications between platforms and various client development processes. I have an interest in the development of the C++ core language and libraries and try to keep up with at least some of the papers on the ISO C++ Standard Committee site at


©2017 All rights reserved.