Thread: Vc++ or my old compiler.

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    86

    Vc++ or my old compiler.

    I installed Visual c++ compiler from microsoft yesterday.. I want to start building windows applications ... However I just do not understand the 'precompiled header' and such...


    I need some help on visual c++ compiler ... or do you guys recommend me to use my old borland compiler, and code the whole thing myself?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I would definitely recommend that you use Visual Studio. I personally don't like precompiled headers - so leave that off...

    If you can write code in Borland, then you can write code using Visual Studio - the only differences are which keys you press to compile, step etc. Both are using essentially the same C++ language.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    I installed Visual c++ compiler from microsoft yesterday
    Are you talking about the 2008 Express edition ?

    However I just do not understand the 'precompiled header' and such...
    Well, for now, you shouldn't care much about "precompiled header". It's just something to make compilation faster (basically). So, except if you have a larger project or a really slow computer, you can forget about it for now.

    When you create a new VC++ Win32 Console Application/Win32 Project, there's an "empty project" box in the last page of the wizard. Click on it, so you'll have a clean environnement. You'll just need to add new files to your project, and voila!

    I really like Visual Studio 2008. Never worked with Borland tough, but i'm quite sure it's not as powerful and easy to use.
    I hate real numbers.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You can disable PCH via projects -> c/c++ -> precompiled headers.
    If you DO use them, you only need to include "stdafx.h" in every source file and it will compile fine.
    With PCH enabled, you can put big headers inside stdafx.h. With PCH, the compiler will only compile them once, saving you compile time.
    It's up to you, really, to use them or to not.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I keep them off and delete the stdafx.h file. What annoys me is that when creating a Win32 project, the "Do not use precompiled headers" checkbox in creation options is grayed out, indicating that they don't recommend that.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Maybe it's Microsoft monopoly? O_O
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Nov 2006
    Posts
    86
    yeah but when I started an empty project, i got this error about stdafx.h, thats why I was wondering about it.... tnx for your help guys

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM