FREE_IDE: using Visual C++ 2005 Express Edition for application development.
Microsoft has recently (launch on November 7th, 2005) released a “free for 1 year
” Exspress edition of Visual Studio C++ (there are also J, C#, VB, SQL and WEB Express editions
). It surely has some limitations (no resource editing in C++ version as described on the product page
for example) but it really looks fine at first glance.
I have been searching for a free IDE from the beginning of KTS project. I have tried a quite large number of IDEs and had been using for some time the SciTE
editor, enhanced with my custom-built toolbar and with manually generated make files. The only thing that I was/am missing in SciTE is the VS IntelliSense (a feature generally lacking in almost all free IDEs). I was kindly surprised when learned about Express editions and straight away decided to try it. I downloaded it, it's about 70 mb. Started the installation and it stopped complaining about ".NET Framework 2.0" found on the machine, just as described on the download page
. I uninstalled the .NET framework, started again the C++ Express installation and few minutes later the process finished successfully.
With almost no obstacles, I managed to convert KTS project from my custom SciTE/Borland 5.0 compiler/make files project to VS 2005 solution. I just needed to add the platform SDK directoriesto the IDE for building win apps (I have already downloaded
that one some time ago together withVisual C++ toolkit 2003
and have been lately testing KTS build with ms compiler instead the Borland one ) and make a few adjustments for KTS additional directories.
The project compiled, I played a bit with the IDE and the only missing feature that I noticed affecting KTS project was the missing resource editor, but since I have always edited the one and only three-lined KTS .rc file manually, that was not a pain in the neck. After using VC++ Express for nearly 2 weeks, it really proved to "simplify development experience".
I am working on the "next" KTS version and at that time, I decided to run my automated test on the current KTS build. I was not much surprised when it showed that KTS is leaking memory. I was making a lot of changes in KTS sources and although it is annoying to search for memory leaks occasionally they do happen. Since I am using almost no overt dynamic memory allocations (the“next” KTS version strongly uses STL instead) I started looking for handles leaking. But no, that was not the case. After some time spent debugging KTS it showed that the problem was in the"log/trace" class. Some 20 - 30 minutes later, I was surprisingly rechecking my debug results when it showed that the problem is in the STL “stringstream” class. It seemed that it is leaking memory every time it is created (not freeing it when destroyed).
A quick search on Google brought me to that
discussion forum that confirmed my memory leak theory.
There is neither patch
nor workaround from MS for the moment (Dec 1, 2005). Memory leak is really a 'showstopper' problem, I could not imagine continuing KTS development using the broken stringstream class and there is absolutely no question of building any "release" with these libraries. However, I really liked the IDE, so I started thinking of some integration of VC++ toolkit in it(it is the 2003 version compiler and after a fast test it showed no problems with stringstream). Ispent three or 4 hours playing with the IDE executable/include/lib directories but finally VC++ 2005 IDE working with 2003 compiler managed to compile KTS project. Later I noticed that with the 2003 compiler the IDE disregards include file dependencies (I mean when I modify include file the IDE does not detect it as modified and does not recompile the source files) but it is no problem for KTS project due to its "wicked" include structure. Although my VC++ Express IDE is currently a mess of the express 2005 IDE, the 2003 Server PSDK and 2003 compiler it currently produces a decent code. The Express edition has some built in limitations (no resource editor) and it showed even more limitations after my stringstream “workaround”, but it is so far the friendliest IDE used in KTS development.
Finally, I should say that KTS project shows that VC++ Express could be used for app development(at least small ones) and when/if the stringstream problem is fixed by MS guys I think it will really "rock". However, keep in mind that for the moment it has some limitations and at least one serious bug in its libraries.edit 07.12.2005
: workaround for stringstream bug
Thursday, December 01, 2005