Is it time to say goodbye to the VC6 compiler?

Recently, I have run into problems that point a finger at the VC6 compiler.

Few of them:

  • The try-block function does not work. Bound Q
  • the constant in the class does not work.
  • __ FUNCTION_ (macro to get the function name) does not work
  • The last addition does not allow passing void functions as part of for_each.

The following example does not compile with the VC6 compiler. He says: "Error C2562: '()': 'void' function that returns a value." It seems that VC6 does not like to pass void functions to for_each.

class Temp { public: Temp(int i):m_ii(i) {} int getI() const { return m_ii; } void printWithVoid() { cout<< "i = "<<m_ii<<endl; } bool printWithBool() { cout<< "i = "<<m_ii<<endl; return true; } private: int m_ii; }; int main(void) { std::vector<Temp> arrTempObjects; arrTempObjects.push_back(Temp(0)); arrTempObjects.push_back(Temp(2)); //Doesnot work, compiler error std::for_each(arrTempObjects.begin(), arrTempObjects.end(), std::mem_fun_ref(&Temp::printWithVoid)); //Works std::for_each(arrTempObjects.begin(), arrTempObjects.end(), std::mem_fun_ref(&Temp::printWithBool)); return 0; } 

You are having other problems related to VC6.0. Any ways to solve these problems? Or is it time to change the compiler?

+6
c ++ compiler-construction vc6
source share
12 answers

Honestly, I can hardly understand why you will not buy a modern computer and do not switch to Visual Studio 2008.

VC6 has a lack of STL, poor C ++ standards, and an outdated graphical interface.

You must not allow your competitors to use better tools than you.

+36
source share

Well, that’s what. The VC6 compiler sucks. However ... the IDE is pretty good.

VS2005 has much better versioning support. Otherwise, it is much slower than debugging, it has a crappy output area that exponentially decreases when inserting output lines (what is absolute garbage coding?), The help system is many times slower and debugging and continues (perhaps the best Microsoft feature compared to others IDE) is significantly broken.

.NET? Of course, VS20xx is the only way to go. However, for one small client that adheres to VC6 / MFC (for interfaces with embedded systems, etc.), I really like working with VC6. It is just FAST.

2008? I would like ... but it takes some time to migrate my clients. Nobody yet.

+7
source share

Is it time to say goodbye to the VC6 compiler?

Yes.

+6
source share

VC6 cannot execute most of any modern C ++. I remember I tried to use one of the boost libraries, a long time ago, like Graph probably, and it gave an “INTERNAL COMPUTER ERROR” everywhere, so in the end I abandoned it.

+3
source share

The hassle-free answer is yes, and as soon as possible. You have free alternatives such as VC ++ express and Code :: Blocks, if the cost is the same as in the release. The pain in resolving compatibility issues is IMO, so there is no reason not to update, because you will have to do it someday, and it only gets more complicated.

The only reason I see a possible hurdle is if you have an MFC code that will be complex / time consuming for the port. In this case, you cannot use VC ++ express (without MFC support), and you should make an investment, at least for VS std. edition. It will cost you around 300 euros (depending on where you live).

+3
source share

I switched from VC ++ 6.0 to Code :: Blocks (which is FOSS) with g ++ a few months ago and did not really look back. I miss the VC ++ debugger a bit, since the gdb implementation in CB is nowhere near slipping, but that’s all. Some things in the IDE work better (code completion, tooltips, dependency calculation) and the compiler is obviously much better.

As for your points, the try block function is hardly widely used, and most people find it useless. The __FUNCTION__ macro __FUNCTION__ not part of the C ++ standard, so you should not depend too much on it if the portability problem is a problem.

+2
source share

No, it's time to say goodbye to him ten years ago. Here are a few reasons:

  • Free compilers are available that are compliant with standards from both Microsoft and others.
  • VC6 was written before the C ++ language was standardized, and it does not meet the standards anywhere. Especially templates and the standard library live in their own world, without reference to how these functions actually work in ISO C ++. The language that it compiles is not C ++. This is a hybrid of the predefined standard C ++, Microsoft extensions, limitations and compiler errors. None of them are desirable.
  • VC6 is known to generate incorrect code in some cases. It not only compiles a self-made, buggy and non-standard language, but also makes invalid optimizations that cause failures, or in some cases actually creates a poor assembly that simply cannot be completed.

It is broken, and it has always been broken. It was designed to compile a language that ceased to exist at about the same time as the compiler (when the language was standardized), and it could not even cope with this task, with countless errors, some of which were fixed in half a dozen update packages that were released. But not all of them, and not even all critical.

Of course, the disadvantage of this is that your application is most likely also broken. (not because you are bad programmers, but because it targets a broken compiler. It must be hacked to be accepted by VC6)

Porting this standardized compiler is likely to be a lot of work. Do not assume that you can just import old projects, click build and it will work.

So, if you are part of a large business that cannot just take a month to switch compilers, you may have to migrate it as a side project, while part of the team supports the VC6 version. Do not break VC6 until you port everything and it works.

+2
source share

If you do not have a large support program, yes. Switch today!

VC ++ Express Versions - Free Download from Microsoft.

+1
source share

You can learn to live with VC6 deficiencies. Nowadays, he has almost no retro charm. For many years, we have been providing the client with several “latest releases of VC6” from some libraries. It is difficult to argue with a client who is willing to pay for additional work and support the branch. But at some point, the cost to support the newer features developed in the new VCs will exceed the cost of upgrading them at the end (especially since more incentives and Intel TBB creep into the head of the code base). Or at least I hope this happens! In the worst case, this will happen just as flaky C ++ 0x support will appear, and we will support this support for them for 10 years ...

+1
source share

I think that’s why so many Windows applications suck because people still use VC6. Why the mess with the broken one never supported MFC or even Win32, when their wxWidgets and Qt4 are better there than MFC, and you can even use the free Visual Studio 2005 + add-ons

+1
source share

The general rule seems to be that the new version is an upgrade and therefore worth it.

But! you have to choose the right time for this, so many errors have been fixed, but then you need to know about new errors and options from the standard.

Mark the time for the update. Upgrading compiler versions may well be the project of your choice, make sure you have stable code and good tests before upgrading, and when you finish proving that it still works the same.

You may need to upgrade when you start development for Vista, as VC6 does not provide ease of code signing, and republishing is not in the form that Vista likes. (want at least VC2K5)

0
source share

Are you updating the OS any time soon? When I examined the migration of our applications to Vista, I found that Vista officially did not support anything until VS 2005 (except VB 6) and has a list of pages with minor problems with VS 2005 that may or may not bite you, I recommended delaying to those until VS 2008 SP1 is available (i.e. when VS 2008 was really useful) and switch the compiler first.

If the project is special for several clients who run it on older NT machines, you may want to save it on VS 6. If you sell it for any general consumption, you will need to make it compatible with Vista at some point ( or 7 compatible or whatever) and you will need to upgrade.

0
source share

All Articles