tags:

views:

813

answers:

8

Hello,

I am just wondering why programmers who program in C++ for windows always use Visual Studio 6 instead of Visual Studio 2008?

Isn't the compiler in 2008 much better than the one in VS6?

The reason I ask as I have used many sdk's that are always written in VS6?

Many thanks,

Steve

+12  A: 

It's a legacy thing. Too much code is written in VC6. There was 4 years between it and VS 2003. And it is always painful to drag the code to new compiler so a lot of developers and managers just don't want to do it.

vava
Many things, newer compilers let you turn some things off (like loop variable scope) to make compatibility with old code easier.
John
@John, it is still painful. Some code might work differently, some code will not be compilable, there will have to be huge testing session to check if everything is ok after transition. And after all, there's not much sense to move if you won't be able to use new compiler features. Transition is painful and doesn't have much sense.
vava
I guess in a totally closed system it _doesn't_ make much sense. The time it becomes more viable financially is when you want to use open-source code and it doesn't compile under VC6, or your 3rd-party software stops shipping VC6 versions of libs/code.
John
@John, oh, come on, company will open source huge chunk of legacy code? Never, I tell you, it's never going to happen. They just erase it completely, it's cheaper and more practical.
vava
@John, and those 3rd party libs, they usually are frozen for whatever version they used to be 10 years ago. It's easier this way, no new bugs are being introduced. No worries if company does not make new version for VC6, old version will work just fine.
vava
I didn't say company would open-source their code. I said if they wanted to _use_ open-source code.
John
@John, ok, sorry. Between troubles finding version compilable with VC6, making that open source code compilable with VC6, making their own version of whatever that open source code is providing and dragging their legacy code to new compiler, the later is most time consuming and will cost more. Not a lot of open source libraries consist of millions lines of code but quite a few legacy systems are that big or bigger.
vava
By the way, it always possible to compile that lib as dll and just load it. Hassle free way.
vava
But my point is these things slowly add up to the point where it's worth the effort. And don't forget that many big projects have requirements on using 3rd-party software that is _supported_... if the supplier drops support for V3.0 you might _have_ to consider using a newer compiler to work with their v8.0 version.
John
@john, sure, it *might* worth the effort. But it is not always so. Otherwise we wouldn't have VC6 or Cobol around.
vava
+1  A: 

The only thing I can think of is that Visual Studio 6 doesn't support .Net (C++.Net in particular) and therefore if you are writing something purely in unmanaged code you don't have to deal with project settings which apply to managed code.

Also, some legacy code base may be written with VS6 and they do not want to deal with upgrading the code base to compile under newer editions of Visual Studio. Especially if the code base is large and complex, or has many 3rd party dependencies or is used with old tools (e.g Purify).

A better question would be whether people would start a brand new project with MSVC++ in VS6 or VS 2008...(no legacy issue)

RobS
What gives with the downvote? Did I say something inherently wrong?
RobS
"if you are writing something purely in unmanaged code you don't have to deal with project settings which apply to managed code" - that's just bad logic. Newer versions of VS let you write old-style unmanaged C++ without any messing about to 'disable .net'
John
+11  A: 

Partly it may be because earlier compilers are often (though not always) faster than later, and more feature-rich/standards-compliant, ones. I don't know whether this applies with VC6 vs later, but it may well do.

In the case of VC6 I think the two major factors are that the IDE is much faster to use than any of the painfully slow and greedy Visual Studio 200x IDEs, and that there's a huge amount of legacy code that will not compile with later, and more standards-compliant, VC++ compilers.

dcw
Good point about the IDE speed. What I'd give for VS6 responsiveness!
RobS
On the other hand VC++6 used to crash more, which is quite a lot of wasted time.
John
A: 

Visual Studio 2008 has compile keys that can ensure compatibility with VS6. So I think reason is that Visual Studio is not free. It cost a lot of money if we are talking about large enough teams.

Kirill V. Lyadvinsky
Visual Studio Express is free, with an IDE too.
Evan Teran
Express edition has no some important features compared to Standard edition, which is not free.
Kirill V. Lyadvinsky
More importantly, you can't use Express Edition to develop commercial software.
vava
@vava: You *can* use Express Edition to develop commercial software. I'm not sure where you get the idea you can't. It's quite explicit in their FAQ:- http://www.microsoft.com/express/support/support-faq.aspx - "Can I use Express Editions for commercial use? Yes, there are no licensing restrictions for applications built using Visual Studio Express Editions."
Iain Galloway
@Iain, hm, thanks, didn't know that. I thought of it as for Academia only.
vava
Do you have a link how to configure VS2008 to compile "VS6-style"?
Simon
I found a tutorial myself how to use VS2008 compiling a VS6 project: http://resnikb.wordpress.com/2009/10/28/using-visual-studio-2008-with-visual-c-6-0-compiler/
Simon
+3  A: 

Aside from there being a great deal of "legacy" code (as other answers point out) there is a much more direct reason for many projects: dependencies.

The runtime DLL for Visual Studio 6 ships on just about every PC going back to something like Windows 98. It is the only runtime that you can rely on being installed on a user's system, which means you don't necessarily need to ship the runtime DLL with your application. Just copying the executable over should be sufficient (other installation issues notwithstanding).

If you use Visual C++ 2008, you have to worry about shipping the correct version of MSVCR90.DLL, MSVCP90.DLL (and potentially many more), and correctly installing the DLLs using the side-by-side mechanism (which usually means building an msi installer).

I know of at least one browser plugin that relies on this to avoid having to download the runtime on a user's machine, which would effectively double the distribution size.

TL;DR? It's simpler!

gavinb
mxp
mxp: Yes, but you as a developer have to worry about that your customers have the redistributable package installed, or your installer must trigger installation. It makes things much more complicated.
MP24
interesting point but I don't think anyone will consider huge distribution size as a problem nowadays. You can always use torrents to deliver it to users after all :)
vava
Linking everything statically removes any problems with dependencies.
vava
Yeah, and if you REALLY want to, you can use the original MSVCRT.DLL in conjunction with VS2008. After all, it's just a DLL.
MSalters
@vava Sure, statically linking avoids one issue. But imagine you ship a plugin that is 350kB when dynamically linked. If you (or your customer) is paying for the bandwidth, statically linking will double the size. When you're talking about thousands and thousands of downloads, doubling the size adds cost and time!
gavinb
@gavinb, sure it does, but it saves you a fortune on support calls :)
vava
Well on a clean install of Windows 2000 msvcp60.dll is not present, nor is there a redistributable available for including in your installer (unlike the newer Visual C++ versions). I'm not sure if this is the case for older OSs, but for Windows 2000 this is a big issue.
Stevo3000
Visual c++ 10 has gone back to allowing you to place those DLLs with the application which makes it a LOT easier. Of course it does have disadvantages too, but generally it makes life a lot easier :)
John Burton
@vava - the VC++ redist is not really an issue of size/bandwidth alone, users also get confused by it.
John
@John, I didn't mean VC++ redist, I meant statically compiled application. Which sure is bigger in size but does not need any libraries or redist packages installed.
vava
A: 

For projects where MSVC compiler quality is critical give some thought to the subject of er .. which MSVC compiler are you actually faced with. The primary reason is "Managed C++ extensions", try and avoid this MSFT C++ extensions at any cost ;o(

GOing "back" to VC6? If you are starting today on a new C++ project, you do not not need VC6. The best advice I can give is to download the latest "express" edition:

http://www.microsoft.com/express/Downloads/

Then simply check that it can compile (and link!) all of your "legacy" C++. Then either proceed using it, on your own desktop or proceed with "good old" VS2008.

There are no deployment issues. VisualStudio team has done a good job here too. Just RTFM, please ;o)

Also keep in mind that VS2010 is very significant release for "pure" C++. Ignore the marketing talk about its WPF/WCF roots etc ... For you most important is the fact that it contains: MSVC 10. Which is pure C++ goodnes.

--DBJ

DBJDBJ
-1, VC7 did intorduce a managed compiler but it also improved the unmanaged compiler a lot.
MSalters
@MSalters: Actually, the C++ language compliance improvements mainly came with VC7.1. Before (and after) that, the compiler team was more focused on .NET - unfortunately.
sbi
Er .. actually VC7 did not improve unmanaged c++ at all. The list of simple templates it could not handle is long. Because of VC7.X , MSFT has a tough time convincing developers to drop VS 6. VC10 seems to be the first convincingly ISO C++ compliant compiler released by MSFT, after a (too) long time.
DBJDBJ
The only problem with express editions and old code is if you use MFC/ATL, you have to fiddle about getting support for these set up (although MS used to provide instructions online, maybe they still do)
John
If one uses MFC, and does not want to replace it, then that one "needs help" beyond stackoverflow.com ;o)
DBJDBJ
I stand corrected. VS 2010 is indeed "verey significant", but the amount of "dead weight" one has to install just to use C++ is beyond tragical, in VS 2010 it is comical. I uninstaled it.
DBJDBJ
A: 

:) i am working on VC6 on work and Home both Reasons are :

At work : -> Our legacy code is VC6 based, So no other option then using this.

At Home

-> As from college time i am using this only so i am reluctant to moving to newer ones.

-> i tried 2005 and 2008 and Express Edition , But do not want to use because

-> They are very heavy in term of process and memory , and slow as compare to vc6

-> I believe in simplicity and sensibility , i found newer version are less easy to operate then vc6

sat
Well, I believe in simplicity, too, which is why I want to use modern C++ features that reduce the risk of errors. With VC6, which comes with a std lib implementation that doesn't even have member templates, this is nigh impossible. Heck, I don't think there's even a current implementation of `shared_ptr` out there that will work on VC6! How can you write simple code without all this?!
sbi
:) you took my message in wrong way.I just wanted to say at work i don't have any control on choosing any other same would be with you if you are working in a big organization and you have 700 MB legacy code :) . At home i use vc6 when i need to see some thing which is work related otherwise i will use GCC(i hv not mentioned). any thx for your comment
sat
I have seen a several MLoC application being dragged from VC6 to VC7.1 to VC8 to VC9. (That was almost a decade.) But that was cross-platform code being compiled on several platforms anyway, which presumably made it easier to port this thing to yet another compiler version. (Well, from VC6 to VC7.1 it was merely removing all the kludges and workarounds necessary for VC6...)
sbi
+1  A: 

I am just wondering why programmers who program in C++ for windows always use Visual Studio 6 instead of Visual Studio 2008?

Answer: They don't. I'd say it's now quite a small minority of projects are using MSVC++6

Isn't the compiler in 2008 much better than the one in VS6?

Answer: Yes, it is much better, and the IDE tools are too

The reason I ask as I have used many sdk's that are always written in VS6?

Answer: these are probably old libraries from a long time ago... most libs I see have been ported to newer versions of VC++ or provide a .SLN AS WELL as a .DSW.

Can I ask where you are finding these old libs? Are they still under development? Are they public, or internal to the company where you work?

The main reason anyone still uses 6 is inertia... it works and they know it and have learned how to use it so the problems are not seen much anymore.

John
We have a major partner that supply use with software API and hardware. The samples they create are always written in VS6 as there is always a .DSW file when I unzip the project. One of my colleges always uses VS6 and will not move to anything else. Trying to find out why they don't want to switch to a later compiler is like talking to a brick wall.
robUK