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. ;-)"
Weird Output (Score:5, Funny)
#include
main()
{
printf ("Hello World!\n");
}
And I got the output "Hello Suckers"
Re:Weird Output (Score:5, Funny)
I tried it as well, the bug exists indeed. The \n really was missing from the output.
Re:Weird Output (Score:4, Informative)
With MS's latest C++ compiler (and with newer Os's), you need "\r\n" to make a new line. This drove me nuts when I first started doing it. Now, it's not so bad.
That is weird, I do not have this problem. The I/O layer should translate newlines for you. All I ever use in Windows programs (console and GUI) is '\n' and it ouputs "\r\n" as well as reversing it on input. This is in both MinGW [mingw.org] and Visual C++ [microsoft.com]
Re:Weird Output (Score:4, Informative)
If the standard I/O library didn't understand line endings, then functions like fgets() could never work, and working with strings (where you expect to be able to match against \n) would be much harder.
Networking is different, since it uses raw I/O, and doesn't pass through stdio's translation layer. Also, you usually want the binary data on the network.
Re:Weird Output (Score:4, Informative)
Here's an excruciatingly detailed explaination [microsoft.com].
Note that fseek() with SEEK_CUR will almost always fail in text mode, since the number of bytes read may vary from the current offset in the file due to the conversion. Recording the current offset with ftell() followed by an fseek() with SEEK_SET will clear that right up.
Crazy but true. This has corrupted my data more than once. Here's an excruciatingly detailed explaination [microsoft.com].
Re:Weird Output (Score:4, Insightful)
Aha! So _that's_ where... (Score:5, Funny)
Re:Weird Output (Score:4, Interesting)
Re:Weird Output (Score:4, Funny)
No; they're actually just the same compiler, packaged under different names and under different licenses.
MS seems to be doing a lot of this lately... (Score:5, Interesting)
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.
Re:MS seems to be doing a lot of this lately... (Score:3, Troll)
I'm a MCSE, but I would never purposfully allow
Re:MS seems to be doing a lot of this lately... (Score:5, Informative)
Since my only Windows machine is 98, it couldn't complete the rest of the install.
Yes, it is a sacrificial test machine. I just wanted to see the EULA.
Re:MS seems to be doing a lot of this lately... (Score:4, Informative)
Re:MS seems to be doing a lot of this lately... (Score:4, Insightful)
Your complaint sounds like someone griping that some piece of free software (could even be Linux-based) isn't really free because it requires a 600Mhz processor and 128MB of RAM and your old 133/16MB will require a CPU and RAM upgrade to run it.
Re:MS seems to be doing a lot of this lately... (Score:4, Funny)
Re:MS seems to be doing a lot of this lately... (Score:4, Insightful)
Re:MS seems to be doing a lot of this lately... (Score:4, Funny)
Re:MS seems to be doing a lot of this lately... (Score:5, Insightful)
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. .net in my house. it activates all my tin foil hat's little buzzers and lights.
I'm a MCSE, but I would never purposfully allow
What the hell? Informative? You're afraid of a program library? Do you not have any clue wthat .net is?
It's users like you that give MCSE's a bad name (and pagan libertarians as well).
Re:MS seems to be doing a lot of this lately... (Score:5, Informative)
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...)
Re:MS seems to be doing a lot of this lately... (Score:4, Insightful)
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.
Yes please! Don't increase the cost for the rest! (Score:5, Funny)
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!
Re:Yes please! Don't increase the cost for the res (Score:4, Insightful)
Re:MS seems to be doing a lot of this lately... (Score:4, Informative)
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.
No assembler? (Score:4, Interesting)
debug demo.com
a
mov ah,09
mov dx,010c
int 21
mov ax,4c00
int 21
w
q
demo
Re:No assembler? (Score:5, Interesting)
Young programmers today don't realize how spoilt they are. Back in the day we all had our copy of the Intel386 assembler document, and a heavily modified version of Abrash's Zen Timer. Have you ever seem a man shuffle assembler instructions by hand to alleviate register contention, or deliberately NOT'ing AX and reversing the following branch to lull the Pentium into correctly predicting the jump, wasting one cycle but saving 4-7 (depending on whether the code following the branch accessed RAM or not, since the prefetch would have been invalidated).
For that matter, do you even remember when we used fancy tricks to either cope with the 64kb code segment limit, or trounce all over it. I hate to say it, but I miss those days, because back then it took more than an optimizing compiler and a few www tutorials for someone to be called a programmer. You actually had to know at least a little bit what was going on under the hood. It wasn't about compilers and libraries and distributed object frameworks, it was about making a limited machine do limitless things.
Re:They're just defending their turf. (Score:5, Insightful)
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.
Re:MS seems to be doing a lot of this lately... (Score:5, Insightful)
Re:MS seems to be doing a lot of this lately... (Score:5, Funny)
Re:MS seems to be doing a lot of this lately... (Score:5, Funny)
Perhaps what you meant to say is:
Developers! Developers! Developers! Developers!Whooooo... Cmon. C-c-c-c-cmon!
If you don't get it, thats ok too
Thanks, but I don't need it -- I have Linux (Score:4, Insightful)
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)
Re:Not needed (Score:5, Informative)
Re:Not needed (Score:5, Informative)
How about some evidence? (Score:5, Insightful)
Re:How about some evidence? (Score:5, Informative)
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.
Re:How about some evidence? (Score:5, Informative)
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.
Re:How about some evidence? (Score:4, Informative)
for(...iterate over buffer...)
for(...iterate over vector...)
do_scaler_op()
And turn it into code like this:
for(...iterate over buffer...)
do_vector_op(...on vector...)
This has nothing to do with hyperthreading. Hyperthreading deals with parallelism between threads, not parallelism within threads. Intel has a seperate facility for the compiler to generate seperate program threads (OpenMP), but the auto-vectorizer does not. The auto-vectorizer works at a much lower level, replacing several scaler ops with a smaller number of vector ops. GCC does not have the analysis technology necessary to do that.
Re:How about some evidence? (Score:5, Informative)
There are at least two easy answers to that question:
Compatability does not seem so much of a problem (Score:5, Informative)
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)
Yes! (Score:5, Funny)
Score one for the team! Microsoft conformed to something!
Re:Yes! (Score:3, Funny)
std::standards.conform(VisualC++, ISOC++);
}
catch (nonstd::ConformanceFailureException cf) {
cout << "Damn!" << endl;
this.serve(FreeCompiler);
}
Re:Yes! (Score:5, Funny)
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!"
Microsoft offers interoperatibility? (Score:3, Interesting)
Re:Microsoft offers interoperatibility? (Score:4, Funny)
Re:Microsoft offers interoperatibility? (Score:4, Informative)
However, considering it cost virtually nothing to get the thing, I don't think this was particularly unfair.
This is a Good Thing(TM) (Score:4, Interesting)
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.
Optimizing beyond Win32... (Score:5, Interesting)
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)
Re:platform SDK (Score:3, Informative)
Re:platform SDK (Score:5, Informative)
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)
But isn't it a C compiler?
What next, Visual PL/I?
Awesome (Score:4, Interesting)
Clippy's response to compiling OSS (Score:5, Funny)
Re:Clippy's response to compiling OSS (Score:3, Funny)
That's 'K' - Karl Marx.
No, no. This is the Gnome version, not the KDE one.
crack is free first time (Score:4, Interesting)
One has to assume MS is worried they're losing their development community to run a scheme like this.
Re:crack is free first time (Score:5, Informative)
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.
Uh...what a ridiculous post (Score:4, Insightful)
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
Come on, guys, let's stay rational here.
Microsoft Had A Change of Heart? No. (Score:3, Interesting)
EULA? (Score:5, Interesting)
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.
Yes, but... (Score:4, Funny)
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.
Re:Yes, but... (Score:3, Funny)
.NET is the potential for platform independence... (Score:4, Informative)
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
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)
Looks like this is just to encourage people to migrate to
Still, nice of them to release it
Asmo
Re:No lib.exe (Score:5, Informative)
Suits me just fine.. (Score:5, Interesting)
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.
Port to Linux (Score:3, Interesting)
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)
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)
Re:Code Size! (Score:4, Informative)
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.
Port Anjuta on top of this? (Score:4, Interesting)
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.
The battle is for the hearts/minds of develop (Score:5, Insightful)
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)
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)
Using new compiler with Visual Studio 6? (Score:4, Interesting)
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...
Re:Using new compiler with Visual Studio 6? (Score:5, Informative)
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).
Re:Edit with VC6, use Scons to build.. (Score:5, Informative)
OPTIONS THAT WERE IN VC6 BUT AREN'T IN VC7 cl.exe: NEW VC7 cl.exe OPTIONS: So as you see most of the differences are new switches for the VC.7 version of cl.exe. Those shouldn't cause any trouble, as VC6 just won't use them by default. The two options removed I don't think are very interesting to most poeple. Besides, the VC.7 cl.exe is happy to ignore them: So as another poster has said [slashdot.org], it looks like it should just work if you put the new directories first in the MSVC6 bin/lib/include paths.
Cool! All the updates I care about for VC 6 without having to switch to a new IDE!
Re:Using new compiler with Visual Studio 6? (Score:4, Funny)
I guess the thing that really irks me about the name "solution" is that it almost makes sense. It's so close to making sense that I want to interpret it literally, like the code I need written is the problem and the solution is contained in a "solution" file. But the "solution" file doesn't contain the solution to my problem most of the time. Like for instance when my code doesn't even compile yet. That's hardly a solution. Or maybe I should interpret it as the solution to the problem of building my application. The build configuration problem. But the most difficult bits of the build problem are contained in the project files. The "solution" file is just a glorified list pointing to several projects. So it doesn't really make sense to think of it as the solution to the build problem.
And I can't think of any other context in which it could be the solution. So it just bugs me, ok.
I think we need to think of a new interpretation of the
Intel has a smilar deal (Score:5, Informative)
Re:Intel has a smilar deal (Score:4, Informative)
Quite a big difference, IMO.
Re:Intel has a smilar deal (Score:5, Informative)
last i checked, Intel's non-commercial license is explicitly linux-only. the only download for the Windows compilers are 30-day evaluations only.
that is, after 30 days, every executable in the Intel directory becomes useless after 30 days.
Does that mean: NO GPL-style Licenses??? (Score:4, Interesting)
***
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.
Re:Does that mean: NO GPL-style Licenses??? (Score:5, Insightful)
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)
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)
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.
Re:My experience with VC++ (Score:5, Insightful)
can't believe I am doing this, but... (Score:3, Interesting)
Re:can't believe I am doing this, but... (Score:3, Informative)
Most of my trouble likely came from being a n00b to the language, and coming from a Pascal background I don't quite like the way C does a few things things (like mul
Ok, here's one (Score:5, Informative)
Example: You create a storage class (my example was a self-redistributing binary tree). The template class Storage<T> has a subclass Storage<T>::Element that holds three Element pointers (parent, left child, right child) and one const <T> pointer.
Of course, the Element class has a constructor, a destructor, a copy constructor, and an assignment operator defined. (Copy constructor and assignment op may not be formally required, but my experience says it's a very good idea to define them in anything that holds pointers).
As in: This code will produce an error. VC++ does not handle functions in named classes inside templates that are not declared inline.
(I may have missed some syntactic detail - It's been a long time since I wrote C++; I write C# these days. But the above annoyed me to no end. It works fine with gcc, which on the other hand can't handle when the functions are implemented inline, which should also work)
Side note: I absolutely love Microsoft's dev tools. This particular example is the exception to me, not the rule.
Re:Ok, here's one (Score:5, Informative)
Re:My experience with VC++ (Score:5, Informative)
MS provides the Debugging Tools for Windows [microsoft.com] as a free download. GUI and command line debuggers are included.
goes both ways... (Score:3, Funny)
CL (the vcc compiler) will let you get away with things that you shouldn't even be able to do (use of variables outside of there scope...), but you don't see it, because BCC didn't let you do it.
CC was the most liberal of them all, it would complile and run your email.
All of this said, strick is a good thing! I means that your code will work elsewhere (wide variety of elsewheres) with little work. Are yo
Re:goes both ways... (Score:5, Funny)
This highlights once again how Windows is a more flexible and modern development platform than Un*x. With Windows, email can be run automatically and remotely, without the need for a separate compilation step.
Get your free Microsoft Debugger right here (Score:5, Informative)
Ask and ye shall receive:
Microsoft Debugging Tools for Windows [microsoft.com]
That toolkit is part of the (also free) Platform SDK [microsoft.com], but you can install it separately. It includes NTSD (command-line debugger) and WinDBG (GUI debugger), and KD (the kernel debugger). NTSD and WinDBG sit on top of the same user-mode debugging engine, "dbgeng.dll". They both include really fantastic on-line help which can teach you a lot about debugging in Windows. That said, they are not for the faint-of-heart (the Visual Studio debugger is much more user-friendly). KD.exe uses the kernel-mode debugger built into every NT kernel by default. Of course, you need a second machine to use KD and a serial cable; when broken into the NT kernel debugger, the debuggee is not in control.
(Incidentally, is there a kernel-mode debugger available for Linux? Last time I checked, Linus opposed the concept very strongly, and Linux did not have one available. He called it a "crutch." Sorry, Linus. Kernel-mode device driver writers *like* their debuggers. I have to say that this could be one of several factors impeding device driver development on Linux.)
It makes as much sense as Linux... (Score:5, Insightful)
If you bothered to download the
Giving the compiler away for free MAKES sense. The only free, mature Windows compiler available is GNU's C/C++ compiler. Although I prefer open-source tools for development, I cannot dismiss Microsoft's compiler as being one of of the best optimizing compilers _there is_. Its only major caveat is the fact that it is designed for one platform only - Windows.
Re:Loop variable? (Score:5, Insightful)
The for scoping you refer to was introduced in the C++ standard, which VC++ supported as far back as version 5 IIRC, however it supported it in a way that was not very useful. You had to turn off all MS extensions to use it, and that also had the side effect of breaking many other things.
As of VC++7 they have a specific switch to enable/disable the for scoping (current version is 7.1, with 8.0 due out next year).
Re:Loop variable? (Score:4, Insightful)
This is the most annoying thing about using compilers that came out before the final C++ standard. The proper scope of such variables flip-flopped between draft standards. Here's a trick I saw somewhere that fixes this problem.
At the top of your code, put this:
That will make the for loop variable scope correct, no matter which draft of the standard the compiler follows.
Re:no! (Score:4, Informative)
END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE
MICROSOFT VISUAL C++ TOOLKIT 2003
IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation ("Microsoft") for the Microsoft software that accompanies this EULA, which includes computer software and may include associated media, printed materials including best practices, white papers, templates, "online" or electronic documentation, and Internet-based services ("Software"). An amendment or addendum to this EULA may accompany the Software. YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE.
MICROSOFT Software LICENSE
1. GRANTS OF LICENSE. Microsoft grants you the rights described in this EULA provided that you comply with all terms and conditions of this EULA.
1.1 General License Grant. Microsoft grants to you as an individual, a personal, nonexclusive license to make and use copies of the Software (i) for your internal use; (ii) for designing, developing, testing and demonstrating your software product(s); and (iii) for evaluation of the Software.
1.2 Documentation. You may make and use an unlimited number of copies of any documentation, provided that such copies shall be used only for personal internal purposes and are not to be republished or distributed (either in hard copy or electronic form) beyond your premises except as otherwise specifically provided herein.
2. ADDITIONAL LICENSE RIGHTS -- REDISTRIBUTABLES. In addition to the rights granted in Section 1, certain portions of the Software, as described in this Section 2, are provided to you with additional license rights. These additional license rights are conditioned upon your compliance with the distribution requirements and license restrictions described in Section 3.
2.1 Sample Code. Microsoft grants you the right to use and modify the source code version of those portions of the Software identified as "Samples" in REDIST.TXT or elsewhere in the Software ("Sample Code") for the sole purposes of designing, developing, and testing your software product(s), and to reproduce and distribute the Sample Code along with any modifications thereof, in object and/or source code form. For applicable redistribution requirements for Sample Code, see Section 3.1 below.
2.2 Redistributable Code-General. Microsoft grants you a nonexclusive, royalty-free right to reproduce and distribute the object code form of any portion of the Software listed in REDIST.TXT ("Redistributable Code"). For general redistribution requirements for Redistributable Code, see Section 3.1, below.
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 product developed by you that adds significant and primary functionality to the Redistributables ("Licensee Software"); (ii) that the Redistributables only operate in conjunction with Microsoft Windows platforms; (iii) to distribute the Licensee Software containing the Redistributables 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; (iv) not to use Microsoft's name, logo, or trademarks to market the Licensee Software; (v) to display your own valid copyright notice which shall be sufficient to protect Microsoft's copyright in the Software; (vi) not to remov
Re:Nice move (Score:5, Funny)
You know that copying it over Kazaa from your mate down the corridor is illegal, right? ;-)
Re:From the posted EULA (Score:5, Informative)
As in, for demonstration only. If you're going to distribute binaries, don't compile them with this tool.
Nope. That clause governs copying of the Software- in other words, the compiler. It says nothing about distribution of works you create using the Software.