Visual C++.NET (2003) Optimizing Compiler

Discussion in 'Game Development (Technical)' started by Chaster, Nov 10, 2004.

  1. Chaster

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    144
    Likes Received:
    0
    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
     
  2. otaku

    Original Member

    Joined:
    Aug 25, 2004
    Messages:
    107
    Likes Received:
    0
    Optimizing compiler

    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 ;-)
     
  3. Dom

    Dom
    Original Member

    Joined:
    Aug 5, 2004
    Messages:
    116
    Likes Received:
    0
    Microsoft Europe do not include games as eligible 'software solutions' :(
     
  4. Mike Boeh

    Administrator Original Member

    Joined:
    Jul 26, 2004
    Messages:
    949
    Likes Received:
    0
    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....
     
  5. Chaster

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    144
    Likes Received:
    0
    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>
     
  6. Dingo Games

    Indie Author

    Joined:
    Jul 26, 2004
    Messages:
    143
    Likes Received:
    0
    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.
     
  7. Chaster

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    144
    Likes Received:
    0
    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...
     
  8. BoggleHead

    Original Member

    Joined:
    Nov 12, 2004
    Messages:
    2
    Likes Received:
    0
    >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).
     
  9. mahlzeit

    Original Member

    Joined:
    Sep 26, 2004
    Messages:
    852
    Likes Received:
    1
    Visual C++ 2005 Express

    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.
     
  10. Phil Newton

    Original Member

    Joined:
    Aug 4, 2004
    Messages:
    83
    Likes Received:
    0
    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.
     
    #10 Phil Newton, Nov 12, 2004
    Last edited: Nov 12, 2004
  11. Chaster

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    144
    Likes Received:
    0
    http://www.sawtoothdistortion.com/Articles/FreeOptimizingCompiler.html
     
  12. Chaster

    Original Member

    Joined:
    Aug 2, 2004
    Messages:
    144
    Likes Received:
    0
    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? :(
     
  13. BoggleHead

    Original Member

    Joined:
    Nov 12, 2004
    Messages:
    2
    Likes Received:
    0
    Thanks Chaster - that did the trick!
     
  14. Nemesis

    Original Member

    Joined:
    Jul 27, 2004
    Messages:
    273
    Likes Received:
    0
    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..
     
  15. otaku

    Original Member

    Joined:
    Aug 25, 2004
    Messages:
    107
    Likes Received:
    0
    Optimising compiler

    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*
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer