Free Optimizing C++ Compiler from Microsoft
FortranDragon writes "Microsoft has made the command line toolkit for Visual C++ available for a free download. You can use the toolkit to build applications and redistribute them if you want (though you should read the EULA for the details, as always). This is a nice boon for those that have to deal with cross-platform compatibility, especially since Microsoft has tried to make Visual C++ more conformant to the ISO C++ standard. Go forth and compile your favorite OSS or FS programs today. ;-)"
MS seems to be doing a lot of this lately. It's nowhere near as open as F/OSS solutions, but it's freeing up access to what's possible with Windows far more than previously.
One of the reasons for the success of OSX is the general geek crowd's appreciation of it's *IX background, but without free dev tools that's nothing but another flavour of unix. Add the ability to dive into developing instantly and there's tens of thousands more developers working for the company.
I develop software for Windows using MinGW and MSys. They provide everything I need for development, apart from the IDE, and this release from Microsoft doesn't include that. The Visual C++ compiler is good, but it isn't extrordinary. Why use it over the open source MinGW tools?
I'm taking an intermediate level C course as part of my studies.. Me and my classmates primary used the free Borland C Compiler (BCC32 5.5.1) and our TAs, the ones marking our work, were primarily using VC++.
Borland's Compiler is much more liberal about not only the syntax it allows, but what code works.. It takes a lot more effort to get things to work in VC++ (whereas they worked fine in BCC and GCC) and we've had lots of trouble stemming from this.
Microsoft can keep their compiler as far as I'm concerned.. although it (usually) comes with a nice IDE and Debugger that I quite like, it's just too bad those remain non-free.
Anyone know where to get a free visual debugger for Win32?
DJ kRYPT's Free MP3s!
Something here makes me doubtful... has anyone here examined tthat EULA already? Are there any paragraphs, which try to limit compiling and/or redistibuting GPL et. al. -licensed FOSS programs?
“Wait for Hurd if you want something real” –Linus
I personally have no love for MS, but I can't help seeing this as a good thing for people that have to support the legacy windows platform.
I recently did some reasearch in AI, and one of the things I did was port an existing simulation written by a former student at my university from a VB/MS Powerpoint front end with BC++ core, to an OpenGL/wxWindows (now wxWidgets) frontend with ISO C++ core.
To establish a baseline I had to make comparisons on the Win32 platfrom. What really amazed me was the difference in efficiency and memory footprint between the VC++.NET 2003 compiler and gcc 3.3.
Although gcc is an excellent compiler, I don't think anyone can argue that MS has the inside track on optimizing Win32 apps.
Finally Microsoft makes a move I really agree with - between this, GIMP, and Blender anybody can make a decent game for Windows without spending a dime on tools. Very nice indeed.
This looks like an aggressive effort to get people to start developing .NET apps since a major part of the free download includes support for .NET.
One has to assume MS is worried they're losing their development community to run a scheme like this.
Did Microsoft have a change of heart? Probably not, this is probably either a part of the anti-trust case against them in which they promised to make their software more interoperable, or it is to stave off anti-trust case part 2.
From the EULA.... Oh wait, I'd have to waste half an hour downloading the compiler to read it. I'm sure there's an evil clause in there. Best thing I could find relating to VS.net runtimes was this old gem:
Use at your own discretion.
As a university student I can get VS.NET2003 Pro with the optimizing compiler for free anyway, but this is a good thing. Please OSS people, don't shy away from it, but use it to compile all opensource apps for Windows for even better efficiency and smaller size helping the popularity of apps like Firefox and Thunderbird and whatever. This compiler really does kick ass.
I know I've used efence to find some nasty, tricksy segfault problems in game programs I've written. Microsoft's "security check" software doesn't really check for security; it checks for memory errors that could lead to security issues in the future, as well as other problems.
N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
Give an example of something you should be able to do (not something you could get away with elsewhere) that you can't do with vcc.
"I'll have a Guinness, no wait, make that a Coors Light" -Grad student I work with, who shall remain anonymous...
...I've been using MS VC and eVC to build code under Winblows and Wince for a long time. I use GNU make under Cygwin with a bunch of fancy default rules.
..the MS compiler is actually not that bad, and you're stuck with at least *SOME* MS tools if you want interoperatibility with other MS tools. MIDL interfaces (formerly ODL), for one.
Having this compiler released means that
a) I don't have to install that confusing GUI
b) I don't have to cough up the money to upgrade (Currently running VC 5.0)
I write library code under UNIX in C, debug it in a sane environment (100% GNU, except for Xemacs) and then port it to Windows (generally pretty trivial -- I port by making Windows look like POSIX, so the UNIX codebase stays basically virgin). Run it through MIDL to get a type library, and all of a sudden your stupid VB developers developing one-off, simple GUIs have access to all kinds of well-debugged code that was originally developed on a sane platform.
As long as your code only touches files or sockets, it will run okay under MS VC.
Do daemons dream of electric sleep()?
The reports are that this compiler produces better code than GCC (only for x86, of course). How hard would it be to use something like Wine to run it under Linux to compile Linux applications? Would that be a violation of the license?
Then we just need a version of Autoconf that builds a makefile for the compiler of your choice (gcc, icc, or mscc).
I compiled the Conformance sample that came with it - Once with G++ [3.3.1] -O2 and once with cl /O2 /EHsc and noticed the huge code size differences -
CL
==
text data bss dec hex filename
76892 8192 0 85084 14c5c conformance.exe
G++
==
text data bss dec hex filename
200508 1992 19088 221588 36194 a.exe
That's horrible code generation from G++. It can't be so bad.
Parry
Anyone had any luck running it in WINE?
How about making Anjuta (or other FOSS C/C++ IDE's, like KDevelop?) run on Windows on top of this compiler and provide Windows programmers with a free competition to VC++?
This way - they get to learn to use an IDE which they can also use on Linux, MS's income might get hurt because people don't HAVE to by VC++ to develop for Windows with MS's optimizing compiler (which is excellent, you can't say it isn't).
Just take this as an advantage for the FOSS community and do something with it, instead of just bitching all day.
Much as i try to think of something bad about this, i really cant (now, dont tell me i am not trying too hard :). :)
I guess lots of editors are going to come up pretty soon that use this compiler to do the actual compiling. That can only be a good thing
Dont make a better sig, you insensitive clod!
Microsoft has spent over a decade essentially supporting only ONE processor architecture, x86. The GNU project has to worry about applying optimization to a plethora of architectures, including the quirks associated with each particular implementation.
Not Microsoft - it gets to focus on how to produce the most amount of work out of a processor of at least 80486 grade instructions. How easy is that? They get to throw a hundred developers to extract every bit of performance possible out of one processor. Every now and then make a modification to support a new supplemental instruction set (MMX, 3dnow!, SSE, etc.)
If you read their optimization whitepapers, you will notice that much of their optimization is done at the math level - nothing Win32 specific. Also, their memory optimization, loop unrolling, inlining, etc. is considered top notch by many software developers.
Ayup
The objective of this is not too hard to discern - keep the geeks and individual developers on the Windows platform. It runs in the same vein as their licensing and releasing Services for UNIX - essentially an admission that CMD.EXE is not everyone's cup of tea as a command interpreter and that, to be frank, for proper scripting, it's actually pretty shit.
:)
I'm not quite sure where they'll go next. They may be following Apple's lead, who have, with Mac OS X, managed to capture an extremely sizeable proportion of the more moneyed developer market by taking advantage of the UNIX foundation and integrating it nicely. It may be that the next thing we'll see is a freebie X11 client.
These kind of things start to make Windows an interesting platform - a closed and, possibly, insecure and buggy base but with some interesting and certainly useful FOSS bolt-ons to make it an extremely compatible platform - imagine having both the traditional Win32 and FOSS software libraries available with little to no portage required! It's a perfect situation for Microsoft - keep the users on Windows (DRMed up and whatever), but appease those who are tempted to switch to Linux by building the best bits right into their current platform.
It's interesting, if nothing else...
iqu
Has anyone tried to integrate the compiler into the Visual Studio 6 IDE? Is it even possible? Would there be any advantages compared to simply installing the recent Service Pack 6 for VS6?
I've got VS 7.1 standard... the non optimizing compiler. If I get this toolkit, can I essentially "upgrade" my compiler?
PT
You are not a unique and individual sig.
I wonder if it is possible to use the newer commandline compiler from within Visual Studio 6. From what I hear, the .NET IDE isn't so great for C/C++ work. And come on, a project file is now called a "solution" file?? That's just dumb.
On the other hand, I would really like to have the better standards compliance of the newer compiler.
The Intel compiler can be used as a drop in replacement for the VC6 compiler, so maybe it's possible to drop in this one somehow. Anyone tried this? Maybe it's as easy as just putting the new compiler tools first in the VC6 bin/include/lib paths.
Hmm. I think I'm going to try this out...
echo 0123456789abI send a message$ >demo.com
debug demo.com
a
mov ah,09
mov dx,010c
int 21
mov ax,4c00
int 21
w
q
demo
Got time? Spend some of it coding or testing
What does it matter when the compiler was released?
Eight years ago gcc had problems with C++. I recall it having internal errors and aborting when trying to compile code with exception handling. The same code worked quite well MS VC++ and I believe Metrowerks C++. This and your complaints may be interesting trivia but they are pretty irrelevant today.
Still intrigued by comments that the Intel compiler produces much faster code than VC, let alone GCC.
And that the linux version of the Intel is freely available. Would love to see benchmarks on a Linux distro compiled with the Intel compiler, maybe gentoo to easily do more than just the kernel.
Section 4 is a standard clause - it's designed so that they keep all rights not given to you in the EULA, rather than you having all the rights not explicitly excluded in the EULA.
***
3.2 If you use the Redistributables, then in addition to your compliance with the applicable distribution requirements described for the Redistributables, the following also applies. Your license rights to the Redistributables are conditioned upon your not (a) creating derivative works of the Redistributables in any manner that would cause the Redistributables in whole or in part to become subject to any of the terms of an Excluded License; and (b) distributing the Redistributables (or derivative works thereof) in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License. An "Excluded License" is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge.
****Does "Excluded License" mean GPL? A type of license that requires you to include the source code?
If this is correct, you can't use it to compile most OS programs...
You're also aware that you may not use the complier to produce anything for non-windows platforms... but that yould be difficult anymway.
I don't need a signature.
(b) distributing the Redistributables (or derivative works thereof) in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License. An "Excluded License" is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge
Ok , if they are not targetting GPL'd code here , what are they targetting ... ?.
GPL says ... provide source, license covers derivative works and should be redistributable under same license by others... damn !
I would personally like Eben Moglen's comments on the license ... but there seems to be no way this affects FSF directly .. so unlikely
Quidquid latine dictum sit, altum videtur
"3. LICENSE RESTRICTIONS -- DISTRIBUTION REQUIREMENTS. If you choose to exercise your rights under Section 2, any redistribution by you is subject to your compliance with the following terms.
3.1 If you are authorized and choose to redistribute Sample Code or Redistributable Code (collectively, the "Redistributables") as described in Section 2, you agree: (i) except as otherwise noted in Section 2.1 (Sample Code) to distribute the Redistributables only in object code form and in conjunction with and as a part of a software application..."
So if you distribute anything compiled with this compiler you are not allowed to distribute the source code along with it.
"You also agree not to permit further distribution of the Redistributables by your end users except you may permit further redistribution of the Redistributables by your distributors to your end-user customers if your distributors only distribute the Redistributables in conjunction with..."
Good grief, too many "distributes" in that sentence. I think they just said that your end users can't redistribute any software that you compiled with this compiler.
"3.2 If you use the Redistributables, then in addition to your compliance with the applicable distribution requirements described for the Redistributables, the following also applies. Your license rights to the Redistributables are conditioned upon your not (a) creating derivative works of the Redistributables in any manner that would cause the Redistributables in whole or in part to become subject to any of the terms of an Excluded License; and (b) distributing the Redistributables (or derivative works thereof) in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License. An "Excluded License" is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge."
x, y, and z sound an awful lot like the terms of the GPL to me.
So in my non-lawyer understanding of this, attempting to compile GPLed source code on this beast would be in violation of the EULA, the GPL, maybe both.
All that we see or seem is but a dream within a dream.
Yes, included.
Yep. Dumpbin.exe works the same way. It just invokes link.exe /dump. The weird part is, neither of those options are specified when you do link /?. You have to know about those commands to get command-line help from them!
Doesn't the full blown Microsoft Studio have a tool that lets you lay out GUIs with buttons and other widgets, and then generates the code with all the positioning and etc ?
It seems to me that this might be one piece of a development environment still not available. I know tools like that are available for wxWindows, but what about for using Microsoft's native widget set ?
i'm personally having a bit of trouble understanding section 3 of the EULA.
section 3.1 requires that software made with this compiler be distributed under (and i quote) "pursuant to an end user license agreement (which may be "break-the-seal", "click-wrap" or signed), with terms no less protective than those contained in this EULA" (emphasis mine)
section 3.2 is less clear. part (b) requires that the "Redistributables" (which, by that, I assume means the standard library and the API libraries) must not be distributed "in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License." it then defines "Excluded License" with a description that sounds suspiciously like the GPL and related licenses. (i.e., no Open Source licensing.)
section 3.1(ii) is an odd requirement: "(ii) that the Redistributables only operate in conjunction with Microsoft Windows platforms;" it sounds to me that it is explicitly excluding ReactOS and Winelib. (please correct me. i want to be wrong here.)
under those restrictions, doesn't this unduly limit us as programmers? shouldn't we be the ones who decide how our software is distributed? Microsoft is requiring us to guard our code as closely as they guard theirs. isn't this a bit extreme?
again, someone please correct me where i'm wrong. i want to be wrong.
grey wolf
LET FORTRAN DIE!
Ah but do you rememebr the 6502 processor? It had one single accumulator, a stack pointer and the X and Y reference registers. Rather slim. Yet elegant.
A friend of mine and I were able to implement a Huffman encoder and decoder in 680 bytes. Yes, bytes not kilobytes. It was probably the tightest program I have even made.
The ultimate 6502 program was probably the one made by the Woz to calculate e to the full accuracy afforded by your RAM, using all the tricks in the book.
Beacuse you can rely on implicit in return from main, or no return statement, but not both.
For undefined behaviour, the compiler is quite entitled to change your output, or do anything.
#define struct union
You may mock! years ago Watcom had a bug in their C compiler that somehow confused the size of a char with the size of an int. This meant I could write a piece of code, apparently to print out a string one character at a time, but instead printed every fourth character instead. I sent them a bug report including some code that would, in the absence of this bug, print the message "fortune coookie". Note, the triple 'o' isn't a spelling error. Think about it!
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
But not the optimizing one. They didn't offer a free developement toolkit suitable for the Free Software hobbiest or someone writing shareware programs that they expected to generate little money. Essentially, to begin writing code they had a barrier to entry ($200 or so) that made people use mingw, cygwin, or switch entirely to linux.
Has anyone managed to apply this download to a Visual Studio .NET 2003 Standard installation, to get the benefits of an optimizing compiler?
.NET crap in Professional addition, I bought Standard edition. Now it seems MS is giving away the optimizing compiler. But how to enable its use from within Visual Studio? has anyone figured out a way to do this?
Standard edition disables the optimizing compiler. You have to pay for Professional edition to get the optimizer. Being cheap, and not needing all the
"The Internet is a sphere whose center is wherever there is intelligence." (Apologies to HDT.)