Become a fan of Slashdot on Facebook


Forgot your password?
Programming IT Technology

Free Optimizing C++ Compiler from Microsoft 953

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. ;-)"
This discussion has been archived. No new comments can be posted.

Free Optimizing C++ Compiler from Microsoft

Comments Filter:
  • by naden ( 206984 ) on Sunday April 18, 2004 @09:30AM (#8896581)
    I just tried the following program:


    printf ("Hello World!\n");

    And I got the output "Hello Suckers" .. anyone have any idea why ?
    • by ion_ ( 176174 ) on Sunday April 18, 2004 @11:47AM (#8897259) Homepage

      And I got the output "Hello Suckers" .. anyone have any idea why ?

      I tried it as well, the bug exists indeed. The \n really was missing from the output.

    • Re:Weird Output (Score:4, Insightful)

      by Gabrill ( 556503 ) on Sunday April 18, 2004 @12:18PM (#8897455)
      You guys are evil, and I like it. It's perfect justice to hit M$ with a Slashdot trying to download a tool that represents one the greatest advantages of open source and Linux (at least a little): the native compiler.
    • ...Ken Thompson's version [] of the C compiler went! (-:
    • Re:Weird Output (Score:4, Interesting)

      by exp(pi*sqrt(163)) ( 613870 ) on Sunday April 18, 2004 @06:17PM (#8899639) Journal
      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!
  • by Amiga Lover ( 708890 ) on Sunday April 18, 2004 @09:30AM (#8896583)
    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.

    • The page seems to indicate that the .net runtime might be installed on your machine if you execute the download; can anyone who has done it confirm this for me? I don't want to have to drive a wooden stake through my CPU.
      I'm a MCSE, but I would never purposfully allow .net in my house. it activates all my tin foil hat's little buzzers and lights.
    • by Anonymous Coward on Sunday April 18, 2004 @09:50AM (#8896682)
      just to clarify this Apple's dev tools ARE included, just NOT installed by DEFAULT.

      EVERY new machine SHOULD come with a separate developer's CD just as every boxed version of OSX should. The end user just has to apply some elbow grease in a) noticing this, and b) bothering to install it.

      Also in the unlikely event that the developer CD is not present or there is an upgrade it is ALWAYS available(even to free online developer members) as a download. Hell even the old classic dev toolset(name escapes me at the moment) has been available free since, what?, 1994/5 or so?

      The only commercial environments are things like Codewarrior(Metrowerks), Absoft FORTRAN, RealBASIC, etc. Codewarrior MIGHT be worth it if you are trying to make money as their compilers are proprietary and USUALLY optimize much better than gcc. (I don't think that anyone has done a recent set of benchmarks of Apple's latest improvements of gcc v. current Metrowerks compiler though...) ...and now that I'm thinking of it most OSes of recent years, free AND proprietary seem to come with some sort of gcc based plus IDE dev tools any more anyways, e.g. BeOS, *Linux, *BSD, OSX, MacOS 7.5-9.x etc. On top of this didn't M$ used to have pretty decent pricing(surprisingly) for VC++/dev studio only anyways? (It's been a while since I've bothered to check.)
      • by ReelOddeeo ( 115880 ) on Sunday April 18, 2004 @10:27AM (#8896876)
        EVERY new machine SHOULD come with a separate developer's CD just as every boxed version of OSX should.

        Twenty years ago I would absolutely agree.

        Not today.

        Only one in one hundred, maybe one in one thousand users would do anything with this CD. (And I am counting the users who make clocks or other decorations out of useless CD's.) Don't increase the cost for everyone so that you can have a CD in the box.

        What development tools? What language? What IDE? There are so many to choose from. If the CD doesn't have the right one, then it doesn't do any good anyway. As soon as two (2) of those tools on that CD are out of date, then the CD is perceived to be out of date.

        If developer tools are to be free as in lunch, then why not just make them available for download. This is much cheaper than including a CD with every computer.
        • Fscking CDs are bloody expensive. Look at AOL, the IT magazines, heck, even newspapers that sell for a few cents. All of them are bleeeeding money given those CDs away for free.

          MS, with his zillions of money in the bank, can't affor to spend a few thousend making development tools available.

          No! Those communist ideas should be brought down and burned like the trojan horse they surely are.

          To give something for free! MS! Never!
        • by c4Ff3In3 4ddiC+ ( 661808 ) on Sunday April 18, 2004 @01:17PM (#8897822)
          What development tools? What language? What IDE? There are so many to choose from. If the CD doesn't have the right one, then it doesn't do any good anyway.

          Just wanted to note. If you install the dev tools on MacOS X, you get perl, python, ruby, c, c++, objective-c, java, php, bash, and probably more right from the start. You even get emacs and vim!

          You also get a nice IDE called Xcode. I don't do much programming so I can't say how nice it really is, but it does the usual project management, debugging, etc that you would expect.
    • by Bastian ( 66383 ) on Sunday April 18, 2004 @10:53AM (#8897010)
      A fair number of folks get into FOSS because they can't afford the dev tools. Intel releases a free C++ compiler that runs on Windows, but it also runs on Linux so there's a potential switching-over point there. Making their compiler free is a halfhearted attempt to stop this potential customer leak. It's the same reason why the copy protection on their dev tools is historically weak - in the long run they're better off having Visual Studio get pirated by _everyone_ if it keeps them from losing geeks and developers to competitors.

      At college, I knew one student in the CS department who owned a legal copy of Visual Studio, and it had been purchased for him by a contract employer. All the other Windows kids pirated it; the only folks who used Dev-C++ and the like were primarily Linux and MacOS people.
    • by jellomizer ( 103300 ) * on Sunday April 18, 2004 @11:01AM (#8897048)
      Well I think Microsoft has found out what the biggest threat to their business. It isn't the quality, security or price of their software that makes them popular. It is and always has been how much software is available for their platform. Since the DOS days up to Win 95 or 98 (I am not sure which) Microsoft always packaged some development software with their OS. Although it was usually just BASIC but still it got people programming for them. After they got their market share they stopped giving away their development software, Then hobby developers who often turn professional developers start switching to Linux and OS X because there are development tools out there for them to program. Now over a long period of time as the old windows software companies merge go out of business, consoled or got bought out, there are less software titles available for windows. And the new programmers out there are programming in Linux and OS X get use to programming in that environment and when they make a professional grade application they release it for that platform. So after a while the software titles available to Linux and OS X could match or exceed that of Windows thus Microsoft will then need to find a way to make up the the long period of time of developers.
    • by Anonymous Coward on Sunday April 18, 2004 @12:32PM (#8897558)
      > MS seems to be doing a lot of this lately.

      Yes. And have you noticed that most of the free giveaways seem to be targetted at developers, rather than users?

      I suspect that Microsoft is trying to attract back the many developers who have switched to Linux.

      Developers like me.

      Unfortunately for Microsoft, it won't work, because it's not about the money.

      I didn't switch to Linux in order to get a free-as-in-beer platform.

      I switched to Linux to get a free-as-in-freedom platform.

      I got tired of Microsoft sabotaging my fvorite applications (e.g. AmiPro).

      I got tired of Microsoft changing the rules, in order to force me to buy upgrades, or to make me lock myself in to Microsoft's new schemes (.Net and MS Internet protocols this time).

      So I left Windows, and started developing for Linux. I don't even bother to port the finished product to Windows.

      There are over 10 million Linux desktop users, and multiple tens of millions of Linux server users. That's a big enough market for me.
  • Not needed (Score:4, Interesting)

    by sweet cunny muffin ( 771671 ) on Sunday April 18, 2004 @09:31AM (#8896587)
    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?
    • Re:Not needed (Score:5, Informative)

      by Anonymous Coward on Sunday April 18, 2004 @09:37AM (#8896610)
      There's a decent free IDE available called Dev-C++ [] for windows, it comes with mingw32 ofcourse.
    • Re:Not needed (Score:5, Informative)

      by lpontiac ( 173839 ) on Sunday April 18, 2004 @09:41AM (#8896633)
      • Microsoft's compiler produces better (smaller, faster) x86 code than GCC.
      • I get the impression that when you move above vanilla C code (eg C++, libraries distributed in binary form only), different compilers don't play so nicely. (Just like gcc 2.9x versus gcc 3.x). And most of the binary only stuff out there on Windows is compiled with Visual C++.
      • by enosys ( 705759 ) on Sunday April 18, 2004 @09:54AM (#8896699) Homepage
        I was going to ask about "why get this if there's MinGW []" but I see it's already been asked. I suspected someone would say Microsoft's compiler produces better code. Now where's the evidence? I'm looking for something like independent benchmarks or studying of generated code.
        • by man_of_mr_e ( 217855 ) on Sunday April 18, 2004 @10:18AM (#8896822)
          This is a few years old (as are most of the benchmarks i've seen) but you can try this []

          Note that this is comparing MSVC 6 (current version is 7.1, and it's improved a lot). In this test, Intel beats everyone, MSVC comes in second with MingW third, however, both the Intel and MS compilers have improved massively in the last couple years. I don't know about MingW. At least part of MingW's success is that they use MS's runtime library, which means that a great deal of the code being run was compiled by MSVC.
          • by Too Much Noise ( 755847 ) on Sunday April 18, 2004 @12:48PM (#8897668) Journal
            heh - benchmarking, gotta love it. Here's a clue about (more recent) compilers - note that the bench you linked to has what would be a 5-gen-old gcc (2.7.x). even 2.9* used to spank MS' cl 13.x (that's the pre-release versions of 7.0 that were also freely downloadable - in fact, MS used to give away compiler toolchains for a long time as part of the SDK, old news, huh?).

            1. recent icc (7.x, 8) spank about everyone on vector fp due to various reasons (like Intel not releasing a full spec of the SSE2 unit - check out the gcc mailing lists about SSE2, you'll see they didn't have info on timings and so on, hence gcc does only some integer optimization and mostly scalar fp).

            2. icc does some (nice when not useless) automatic parallelization of code (the idea being to use hyperthreading better).

            3. gcc 2.9x -> 3.1+ was a big improvement as well (moreso for 3.2+, check the docs for the new way they do the machine description for scheduling). Just check your own link.

            4. -ffast-math on gcc only has it do what both Intel and MS are already doing - using the bloody fp unit instead of software emulation!!! (easy proof - do an asm dump of the generated .o file).

            5. another big thing that's done by default by icc and cl is the gcc flag -fomit-frame-pointer (which on x86 is quite important due to register starvation). Again, gcc has that missing.

            Actually, looking at the compiler flags makes me wonder whether there's any point in taking those bench's seriously - the guy didn't even bother to use anything more than -mcpu=i686 (aka 'generate for pentium pro) for gcc, and the other compilers' switches are still close to minimal (even if they mean quite more than the gcc one). Makes one wonder about how competent the guy doing the benchmark was.
        • by Anonymous Brave Guy ( 457657 ) on Sunday April 18, 2004 @10:54AM (#8897013)
          I suspected someone would say Microsoft's compiler produces better code. Now where's the evidence?

          There are at least two easy answers to that question:

          • Look at the disassembly for any reasonably complex algorithm, and spot all the platform-specific optimisations that VC++ (and indeed most other commercial compilers on Windows) perform that GCC (due to its portability requirements) does not.
          • Use Google, and look for people who've compared the real world performance of non-trivial apps built with each compiler. (You might do better with Google Groups than the Google web search engine on this one.)
      • by spitzak ( 4019 ) on Sunday April 18, 2004 @11:12AM (#8897092) Homepage
        I have quite successfully linked C++ libraries compiled with GCC, VC++, and the IntelCC compiler with no problems. It appears to be ok. Perhaps code that relies on internals of STL would fail, but at least pointers to STL objects actually port back and forth.

        I agree that VC++ produces faster code than GCC. Don't really know how much, because we don't use GCC on Windows anymore because of this, except to make dependencies for the makefiles. Can't be too much today, as our GCC-compiled Linux versions seem to run at the same speed as the IntelCC compiled Windows version.

        The IntelCC compiler produces code almost twice as fast as VC++6. I believe VC++7 is much better, however, but have not tested it.
    • Re:Not needed (Score:5, Insightful)

      by tesmako ( 602075 ) on Sunday April 18, 2004 @09:48AM (#8896677) Homepage
      Because it starts to feel like I have wasted several years of my life waiting for g++ by now. g++ is probably the slowest compiler I have ever used.
  • Yes! (Score:5, Funny)

    by Flingles ( 698457 ) on Sunday April 18, 2004 @09:31AM (#8896589) Journal
    "tried to make Visual C++ more conformant to the ISO C++ standard"

    Score one for the team! Microsoft conformed to something!
    • Re:Yes! (Score:3, Funny)

      by Anonymous Coward
      try {
      std::standards.conform(VisualC++, ISOC++);
      catch (nonstd::ConformanceFailureException cf) {
      /* We are here */
      cout << "Damn!" << endl;
    • Re:Yes! (Score:5, Funny)

      by nukey56 ( 455639 ) on Sunday April 18, 2004 @09:47AM (#8896668)
      Seems firmiliar.. ahh yes.

      Goth Kid #3: "I'm the biggest non-conformist!"
      Goth Kid #4: "I'm such a non-conformist, that I'm not going to conform with the rest of you. I'll do it!"
  • by plj ( 673710 ) on Sunday April 18, 2004 @09:32AM (#8896592)
    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?
  • by El Cubano ( 631386 ) on Sunday April 18, 2004 @09:33AM (#8896595)
    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.
    • by aksansai ( 56788 ) <aksansai&gmail,com> on Sunday April 18, 2004 @10:24AM (#8896857)
      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.
  • platform SDK (Score:5, Informative)

    by halfdan the black ( 638018 ) on Sunday April 18, 2004 @09:34AM (#8896598)
    The platform SDK which includes the command line compiler, linker and debugger has allways been a free download (hasn't it). Also, the .net SDK which includes all the languages, libraries, and compilers has also allways been a free download, this is what sharp develop uses.
    • The command line C++ compiler was never included in the SDK. The C# compiler and so on were, however.
      • Re:platform SDK (Score:5, Informative)

        by hobuddy ( 253368 ) on Sunday April 18, 2004 @10:49AM (#8896990)

        The command line C++ compiler was never included in the SDK. The C# compiler and so on were, however.

        That's incorrect. The .NET SDK has always included the C++ compiler (installed by default to C:\Program Files\Microsoft Visual Studio .NET 200x\Vc7), but the compiler was the Standard Edition, without an optimizer. If you pass it an optimization switch, the Standard Edition issues a warning to the effect that "The Standard Edition of Microsoft Visual C++ does not include an optimizer.". Naturally, lack of an optimizer makes the Standard Edition almost useless for production code.

        This newly released command-line compiler includes a fully functional optimizer. It's the same C++ compiler that underlies VC++ .NET 2003 Professional.

  • huh? (Score:4, Funny)

    by Knights who say 'INT ( 708612 ) on Sunday April 18, 2004 @09:38AM (#8896615) Journal
    Go Forth?

    But isn't it a C compiler?

    What next, Visual PL/I?
  • Awesome (Score:4, Interesting)

    by Ryvar ( 122400 ) on Sunday April 18, 2004 @09:39AM (#8896622) Homepage
    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.
  • by foidulus ( 743482 ) on Sunday April 18, 2004 @09:39AM (#8896623)
    Clippy: "It looks like you are trying to compile the gimp, did you know the GPL was written by Carl Marx, you don't want to be un-American do you? If you need help embracing capitalism, please ask me."
  • by mabu ( 178417 ) on Sunday April 18, 2004 @09:40AM (#8896626)
    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.

    • by mattgreen ( 701203 ) on Sunday April 18, 2004 @10:14AM (#8896803)
      I know knowledgable comments are looked down on at Slashdot, but the .NET SDK has been free from the start and included cl.exe, (the C++ compiler) but it was the non-optimizing compiler I think. What the .NET SDK didn't have was the full STL and a few other things that are now free.

      The end-result of this is everyone gets a free compiler upgrade if they haven't moved to VC7.1 already. It means on my OSS project I can say "VC7.1 minimum," and expect everyone can follow suit without a problem. However I realize this isn't as fun as tin-foil explanations, so I'll let you get back to that.
    • by bonch ( 38532 ) on Sunday April 18, 2004 @02:43PM (#8898415)
      Only on Slashdot does Microsoft giving away a free command-line compiler (which they've always done in the past along with the rest of the SDK) somehow mean "MS is worried they're losing their development community."

      Losing it to what? Windows is 95+ of the market out there. As pointed out before, this isn't some "aggressive effort to get people to start developing .NET apps"--.NET has been a free download since the very beginning.

      Come on, guys, let's stay rational here.
  • by Famatra ( 669740 ) on Sunday April 18, 2004 @09:40AM (#8896627) Journal
    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.
  • EULA? (Score:5, Interesting)

    by nukey56 ( 455639 ) on Sunday April 18, 2004 @09:41AM (#8896634)
    From linked site:
    Are there any restrictions on how I use the Visual C++ Toolkit?

    In general, no. You may use the Toolkit to build C++ -based applications, and you may redistribute those applications. Please read the End User License Agreement (EULA), included with the Toolkit, for complete details.

    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 runtimes was this old gem:

    You may not disclose the results of any benchmark test of the .NET Framework component of the OS Components to any third party without MicrosoftÃÂ's prior written approval.

    Use at your own discretion.
  • Yes, but... (Score:4, Funny)

    by heironymouscoward ( 683461 ) <heironymouscoward@yah o o . com> on Sunday April 18, 2004 @09:44AM (#8896647) Journal
    Does it run on Linux?

    Do I still want to write non-portable code in 2004? Apparently MSVC produces better code then gcc on Windows, but is that reason enough to use it rather than (e.g.) cygwin?

    As a programmer, I insist on platforms that are 100% portable, so that my code can survive any OS and vendor changes. At the very least a commercial compiler must implement the standard language and libraries so that my code is portable.

    Still, this is a good move for Microsoft and I welcome it.
    • The day Microsoft releases a real cross compiler is the day I'm going to add a layer onto this here foil hat of mine...
    • by aksansai ( 56788 ) <aksansai&gmail,com> on Sunday April 18, 2004 @10:14AM (#8896806)
      The Mono group ( has been working on achieving platform independence with .NET and C#. Programming in C#, in many respects, has the feel that C++ is just getting ancient. C# constructs and methods, although not entirely mature, have learned from the best object oriented languages that we have right now.

      C# code for Microsoft's compiler (of an ECMA standard programming language), should run as advertised on a Mono CLR environment - once it becomes mature. Look at the many cross-platform (Windows/Linux) classes available for both .NET and Mono.

      Since Mono is an open-source effort, Mono could be extended to MacOS X, FreeBSD, etc.

      True portability is one source code - many OSes and architectures.
  • No lib.exe (Score:4, Informative)

    by Asmodeus ( 10868 ) on Sunday April 18, 2004 @09:48AM (#8896672)
    Major omission - no lib.exe for building .a files

    Looks like this is just to encourage people to migrate to .NET as without lib.exe it is pretty useless for larger projects.

    Still, nice of them to release it

  • Suits me just fine.. (Score:5, Interesting)

    by multipartmixed ( 163409 ) * on Sunday April 18, 2004 @09:54AM (#8896700) Homepage
    ...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.

    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) ..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.

    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.
  • Port to Linux (Score:3, Interesting)

    by crow ( 16139 ) on Sunday April 18, 2004 @09:58AM (#8896717) Homepage Journal
    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).
    • Re:Port to Linux (Score:3, Insightful)

      by Anonymous Coward
      wine CL myfile.c -o myprog.exe
      wine myprog.exe
      Is that what you want? It's not a crosscompiler. It compiles for Windows, not for Linux.
  • Code Size! (Score:3, Interesting)

    by parryFromIndia ( 687708 ) on Sunday April 18, 2004 @09:59AM (#8896725)
    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
    • Re:Code Size! (Score:4, Informative)

      by lkaos ( 187507 ) <> on Sunday April 18, 2004 @10:11AM (#8896787) Homepage Journal
      Large code size != bad code generation.

      Considering a very common (and powerful) optimization of inlining. What you literally do is change function invocations to the code for that function.

      Another common (but more advanced optimization) involves making an optimized duplicate of a particular code path.

      What you're probably seeing is a difference between the included optimizations in GCC's -O2 verses MSVCP's -02. Try enabling individual optimizations and then comparing code size if that's what you're interested in. That's a more fair metric.
  • by Anonymous Coward on Sunday April 18, 2004 @10:12AM (#8896797)
    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.
  • by pcause ( 209643 ) on Sunday April 18, 2004 @10:23AM (#8896848)
    Early on, Microsoft understood that the platform battle is won by those that win the hearts and minds of developers. DOS was a *terrible* environment, but developers built some cool applicaitons and the platform became a huge success. You have to look at this announcement in conjunciton with the Unix Services for Windows announcement.

    VB and the VB tools captured a good chunk of corporate developers. I hate VB, but you coul design and build simple forms based applications that talk to a database pretty quickly and easily. Visual Studio provide an excellent intregrated IDE (no flames from Borland lovers) for many C++ developers. it simplified a lot of routine stuff, made finding funcitons easy, integrated the debugger and more. Lots of folks.

    IBM recognized that it needs developers for Java to succeed and the purchase of Rational was aimed at getting the corporate developer that is on VB and VC++.

    With this compiler and the USFW annoucement, you can now take the *nix stuff and port it pretty easily and for free to Windows. No more need to assemble tools, install Cygwin or the like. There used to be a barrier to getting *nix stuff to Windows. it is now gone. Microsoft will now have a platform, that is free, to allow free software developers to make their stuff available on Windows as native applications. And you cna then add Windows extensions if you want.

    The unreliguous among us will grab this and move *nix stuff we've been missing or haven't had access to.
  • Motive (Score:5, Interesting)

    by ickoonite ( 639305 ) on Sunday April 18, 2004 @10:27AM (#8896875) Homepage
    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 :)
    • Re:Motive (Score:4, Interesting)

      by cubic6 ( 650758 ) <tom.losthalo@org> on Sunday April 18, 2004 @01:01PM (#8897732) Homepage
      Rumor (and MSDN) says that Longhorn will ship with a full .NET development environment including compiler, debugger, and build manager. This makes it the first time since QBasic that a kid could learn how to program with only the tools installed with the OS. I don't see them integrating X11 any time soon, since it doesn't have most of the features of the Avalon framework that they're trying to introduce. If they did, it'd probably be a heavily extended version.
  • by baxissimo ( 135512 ) on Sunday April 18, 2004 @11:15AM (#8897108)
    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...
    • by omicronish ( 750174 ) on Sunday April 18, 2004 @03:01PM (#8898560)

      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.

      I'm currently writing C++ code using Visual Studio.NET, and I haven't noticed any problems compared to Visual C++ 6. Some of the keyboard shortcut defaults are different, but you can revert to the VC++ 6 layout easily.

      I think the main reason it might not seem as good for C++ work is that VS.NET adds considerably more features geared towards .NET development, while C++ appears to be neglected somewhat. Remember that VS.NET's IDE supports all their .NET languages, and C++.

      For clarification, a solution can contain multiple projects. The old term they used was workspace. Yeah, I thought it was weird at first, but it's just terminology, plus a workspace sort of implies open windows and developer-specific settings to me. A single solution can be used by multiple developers (CVS works nicely).

  • by Animats ( 122034 ) on Sunday April 18, 2004 @12:56PM (#8897707) Homepage
    Intel's C++ compiler is also free for non-commercial use. [] It even runs under Linux.
  • by koi88 ( 640490 ) on Sunday April 18, 2004 @12:58PM (#8897712)
    From the EULA I found here:

    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 ran into this with 7.1. Upon discussion with the legal types, we determined this:

      In order to release our application under the GPL, we would have to write a "special exception" permitting linking with Microsoft runtime libraries, same as we currently do with linking against OpenSSL and some other BSD-licensed stuff.

      Not too difficult, but it does tend to become annoying to write all those special execptions. I proposed a minor change to the GPL's wording to address this type of situation, but who knows if it'll make it into GPL 3.

      Though there would be no problem compiling existing apps with this toolkit, as long as you didn't distribute the resulting binaries.

      This post is not legal advice. Check with your attorney first before doing anything. The issues raised here are quite complex legal issues and you are going to need a damn good lawyer, especially since you're dealing with Microsoft here.

  • Code theft? (Score:5, Funny)

    by moosesocks ( 264553 ) on Sunday April 18, 2004 @01:50PM (#8898004) Homepage
    It looks like some GNU developer has already disassembled it and integrated some of the code into GCC.

    I just went to compile vi, and an ASCII paper clip popped up onto my terminal:
    "It looks like you're trying to compile EMACS. Would you like me to launch the EMACS wizard now. Because you are stupid, I will launch it anyway"
  • EULA section 3 (Score:5, Interesting)

    by the_greywolf ( 311406 ) * on Sunday April 18, 2004 @05:02PM (#8899272) Homepage

    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.

System restarting, wait...