How useful is Visual C++ 2008 Express Edition for commercial use?

Jan 21, 2008 18:32


The Visual Studio 2008 Express Editions FAQ clarifies on point 7 to the question "Can I use Express Editions for commercial use?" with the reply that "Yes, there are no licensing restrictions for applications built using Visual Studio Express Editions".

Intrigued by the fact that there are no licensing restrictions, I wanted to find out exactly how suitable the Visual C++ Express Edition would be for a real life commercial project. And I had just the thing to test it out. We were considering moving our 10 year old, 95 project, 1 million line Visual C++ 6.0 code-base to the latest version.

This project (Xtend IVR) had a mix of every programming technology imaginable; MFC, Active-X, COM, .Net, CLR Hosting, User mode drivers, Multimedia, Voice Cards, VB, Plugins and so on. I already knew that the Visual C++ 2008 Express Editions do not have either MFC or ATL. My plan therefore was to pick a couple of projects that do not have dependencies on MFC or ATL and get them to compile and build correctly under Visual C++ 2008 Express Edition.

The natural choice was therefore the voice cards driver section of Xtend IVR which generates the driver DLLs for Dialogic (Global Call & Diva Server SDK), Ai-Logix, NMS Communications, Donjin and Synway. As a test case, I decided to try converting the driver for Dialogic Diva Server voice cards to use Visual C++ 2008 Express Edition.

To my pleasant surprise Visual C++ 2008 Express Edition directly converts and opens a Visual C++ 6.0 workspace (.dsw) file with a single click. That's real nice of Microsoft. I was expecting to have to jump through hoops doing a vc 6.0 -> vs 2003 -> vs 2005 multi-step conversion before finally being able to open the workspace.

Now that I was in, I decided to do a test compile.

1 error and 45 warnings.

That was not too bad. Most of the warning seems to be related to the deprecated functions. Ok, let's add the _CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T defines to "Preprocessor Definitions" in the Project->Properties->Preprocessor Definitions. That should help to temporarily get rid of most of these warnings. Hit F7 and

1 error(s), 0 warning(s)

Wow, I just got rid of all those warnings. That wasn't so hard. So what's the error..?

fatal error RC1015: cannot open include file 'afxres.h'.

Hmm.., "afxres.h" is an MFC include. Let's replace that with #include < windows.h> and hit F7

1 error(s), 0 warning(s)

So, what's the problem this time?

error RC2104 : undefined keyword or key name: IDC_STATIC

Hmm..., IDC_STATIC is defined inside afxres.h, no wonder it can't be found. Add the following lines.

#ifndef IDC_STATIC
    #define IDC_STATIC (-1)
    #endif

and compile. Yippee... it builds.

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

and runs perfectly as well!

But then I run into a stumbling block. The Dialogic Diva Server driver includes one configuration dialog as a resource and the Visual C++ Express Edition does not have an Resource Editor for unmanaged code (It is only included in the Standard Edition or higher). Looking around, I locate ResEdit - which is a free resource editor for Win32 programs. Seems to be quite neatly done.

However attempting to load the .rc file gave a few errors. These went away once I added "C:\Program Files\Microsoft SDKs\windows\v6.0A\Include" to the Options-> Preferences->Include Paths setting of ResEdit. I made some changes to the dialog, saved and compiled from Visual C++.

error RC2104 : undefined keyword or key name: TRACKBAR_CLASS

The solution was to add #include < CommCtrl.h> to the .rc file just below the #include < windows.h> and compile

========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Success!

So, what were the lessons learned?

For a project not involving MFC or ATL, upgrading from Visual C++ 6.0 to Visual C++ 2008 Express Edition is easy. However the absence of the resource editor is something you have to live with. ResEdit takes away most of the pain, but if you are developing commercially using Visual C++, you are better off with either the Standard or higher editions.

In my opinion, Microsoft has found the sweet spot where the Visual C++ 2008 Express Edition has nearly all the features a hobbyist or beginner would ask for, while at the same time ensuring that commercial development happens on the Standard or higher editions.
Previous post Next post
Up