View Full Version : Visual C++.NET (2003) Optimizing Compiler
Chaster
11-10-2004, 08:27 AM
Hi Everyone,
I recently made the upgrade to Visual C++.NET (2003) Standard Edition. I have been using VC 6.0 Pro for what seems like eons. I had been avoiding updating to 7.x because Visual Studio.Net was too darn expensive, and lots of people were complaining about Standard edition not having an optimizing compiler (ugh).
So anyway, as people probably already know, MS decided to release the optimizing compiler for free through the VC Toolkit, and I found a webpage which described how to use the optimizing compiler in the toolkit with standard edition Visual C++.NET.. Again, probably everyone already knows this..
So, finding I could get basically VisualC++.NET WITH optimization for about $100, I decided to go ahead and do it.
So, I bought it, brought it home and installed it (VC++.NET Standard 2003). This is where I was surprised. I did a build of OGRE (www.ogre3d.org) and lo and behold, the release build was optimized!... I was surprised by this because I thought I would have to install the VCToolkit, but I didn't.
Went into the compiler settings, and saw that yes indeed, release builds used optimizing switches such as /O2...
So, the gist of the story is - STANDARD edition Visual C++.NET 2003 *DOES INCLUDE* the optimizing compiler. No need to buy Visual Studio.Net or to use the VCToolkit.... :D
I apologize if this is common knowledge - I found no mention of this doing a search in google or in this forum.
Chaster
otaku
11-10-2004, 11:08 AM
Any version of Visual C++ will perform optimisation on any build you desire. The differences between Standard and Professional and Enterprise are clearly detailed on Microsoft's website.
If you have announced a title and are intending to ship it within the next 2 years I would recommend the Microsoft ISV Empower programme for $400 which gives you five licenses for Visual Studio.NET Enterprise Edition, pretty much every operating system Microsoft has ever made, an Microsoft Office, along with a lot of other Microsoft software -- does not include their games unfortunately ;-)
Microsoft Europe do not include games as eligible 'software solutions' :(
Mike Boeh
11-10-2004, 02:04 PM
That is not the case with mine, I had to use the toolkit compiler. The reason the /O2 is there is because it was already in your project. But if you check the compiler output window, you should see a message that the compiler doesn't support optimization. At least that's what I saw. All is fine with the toolkit though....
Chaster
11-10-2004, 08:48 PM
That is not the case with mine, I had to use the toolkit compiler. The reason the /O2 is there is because it was already in your project. But if you check the compiler output window, you should see a message that the compiler doesn't support optimization. At least that's what I saw. All is fine with the toolkit though....
I double checked and I got no warnings/errors... And the code ran just as fast as the prebuilt demos (this is for Ogre3D). <shrug>
Dingo Games
11-10-2004, 09:33 PM
I double checked and I got no warnings/errors... And the code ran just as fast as the prebuilt demos (this is for Ogre3D). <shrug>
Hmm, I remember that it didn't work for me either. I had to install the toolkit.
I think that this is the way that it works:
Even though it shows /O2 under the optimization settings, /O2 doesn't actually get passed to the compiler. If you look under "C/C++ => Command Line", you can see all the parameters that actually get passed to the compiler. For me, /O2 should be there, but it isn't. I have to type it into "Additional Options".
Try typing /O2 under "Additional Options" and see if you get the "non-optimizing compiler" warning.
Also, you might not even notice the difference that the optimizations make. I think I've read the figure 10% faster somewhere. But if the bottleneck is the graphics card, I doubt that you would see that much difference.
Chaster
11-11-2004, 01:05 PM
Whoah - you're right Dingo, even though it shows that it is using the optimizations in the project settings, it wasn't really using them.
I added /02 to the additional settings and the compiler threw a warning saying I couldn't do that with the standard compiler...
Ah well - I already have the toolkit installed, just a matter of changing directory settings..
Thanks so much for pointing this out! =)
Chaster
p.s. strangely, the processor optimizations (like /G6 or /G7) seem to get passed okay...
BoggleHead
11-12-2004, 02:24 AM
>Chaster Wrote: "I found a webpage which described how to use the
>optimizing compiler in the toolkit with standard edition Visual C++.NET"
Can you give me the address for that page? I've installed the toolkit, but can't find a way to use it from within Visual C++.NET Standard Edition (all the optimization options are still grayed out).
mahlzeit
11-12-2004, 03:08 AM
Visual C++ 2005 Express (http://lab.msdn.microsoft.com/express/visualc/default.aspx)
As far as I know it is free and includes the optimizing compiler. I don't know if there are any restrictions to commercial usage.
Phil Newton
11-12-2004, 04:49 AM
I think the Express edition only compiles to C++.NET 2.0. There is a way to get it to compiler Win32 binaries, but I can't remember where I read it.
Edit: Instructions to compile Win32 Binaries can be found here (http://lab.msdn.microsoft.com/express/visualc/usingpsdk/default.aspx).
Chaster
11-13-2004, 09:32 AM
>Chaster Wrote: "I found a webpage which described how to use the
>optimizing compiler in the toolkit with standard edition Visual C++.NET"
Can you give me the address for that page? I've installed the toolkit, but can't find a way to use it from within Visual C++.NET Standard Edition (all the optimization options are still grayed out).
http://www.sawtoothdistortion.com/Articles/FreeOptimizingCompiler.html
Chaster
11-13-2004, 09:35 AM
Visual C++ 2005 Express (http://lab.msdn.microsoft.com/express/visualc/default.aspx)
As far as I know it is free and includes the optimizing compiler. I don't know if there are any restrictions to commercial usage.
Is this a Beta product or is it production? I mean, has Microsoft decided to start giving their C++ compiler away free now? Did I just waste $100? :(
BoggleHead
11-15-2004, 05:35 AM
Thanks Chaster - that did the trick!
Nemesis
11-15-2004, 06:16 AM
At my end the goverment made an agreement with Micrisoft and for a while one could get a niced boxed copy of the standard edition of VS.NET 2003 for something like US$30, provided it was for educational purposes! Needless to say, I snatched one like a starving hyena.. I was well past my student days but my mother happens to be a teacher..
otaku
11-15-2004, 12:12 PM
I guess this will teach me to open my big mouth before thoroughly checking the subject matter. Yep, by the above threads and a little research it appears Microsoft pulled a quick switcheroo and quietly took out the optimising flags from certain versions. Rather sneaky of them.
To the person who can't get MSDN in Europe do to "games." Have you thought of just announcing and releasing a small application? A screen saver? Believe it or not screen savers do tend to sell quite well. The aquarium ones, the shark ones, etc. Just a thought.
*wanders off to find out why the hallway outside his office suddenly smells very strongly of laundry detergent*
Powered by vBulletin™ Version 4.1.3 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.