Jayakrishnan K. ([info]jayakrishnan) wrote,
@ 2008-01-21 18:32:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
How useful is Visual C++ 2008 Express Edition for commercial use?

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.



(Post a new comment)


(Anonymous)
2008-01-21 07:20 pm UTC (link)
I'd add that all 3rd party VS plugins require the Pro edition.

(Reply to this)

Unit tests
(Anonymous)
2008-01-22 07:27 am UTC (link)
I would also add that the Visual Express doesnt have any support for unit testing at all. And that makes Express not applicable for commercial development

(Reply to this) (Thread)

(Reply from suspended user)
Cross-Platform Development
(Anonymous)
2008-01-22 07:44 pm UTC (link)
If you're doing cross-platform development using CMake and a unit testing framework that outputs to the debug window of Visual Studio and if you don't need MFC and Ressources anyway, you can perfectly use it for commercial development :-)

(Reply to this)


(Anonymous)
2008-01-23 09:46 am UTC (link)
If your a java programmer and maybe want to do some c++ com programming, Visual C++ 2008 Express Edition works perfect.

(Reply to this)


(Anonymous)
2008-06-02 07:34 pm UTC (link)
Very nicely done. Useful info, succinct presentation.
Thanks.

(Reply to this)

Repair Windows XP by using the XP installation CD
(Anonymous)
2008-08-31 04:29 am UTC (link)
Hello Everybody

Just wanted to share my new experience.

If your system fails to start due to an error corresponding to lost HAL.DLL, invalid Boot.ini or any other critical system boot files you can repair this by using the XP installation CD. Just boot from your XP Setup CD and enter the Recovery Console. Then launch "attrib -H -R -S" on the C:\Boot.ini file and remove it. Run "Bootcfg /Rebuild" and then Fixboot

Regards,
Carl

(Reply to this)


(Anonymous)
2008-10-30 09:53 pm UTC (link)
Besides the lack of ATL/MFC/Resource editor, there is another serious missing thing: Documentation. The Platform/Windows SDK Documentation is absent in MSDN Express and Online, well you can get some of these by downloading those SDKs, but you have to integrate them manually, that is almost like having VS Standard for free, so should't VS Standard be free anyway, like XCode is for example?

(Reply to this)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…