![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
"stdafx.h"
just started using visual studio, precisely what is this library?
dawei...?
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#2 | |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
stdafx.h is the precompiled header file.
"The precompiled header file should include the big header files which slow down your builds. The most obvious candidate is windows.h, the 800 lb gorilla of the header file world. Other possible candidates are STL header files. " I found a good article on VC++ compiling techniques: Fractal eXtreme MSDN: Quote:
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
|
#3 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Personal perspective: I normally only write small things. I remove (or set up so as not to incur) the stdafx things and turn off precompiled headers. Even when using windows.h. My compile/links probably take 5 seconds, tops. It's nothing like the doorstops we used to be saddled with, where you started a compile and took a 30-minute break.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
I wonder how long it took for Microsoft to compile one of their operating systems or office programs.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#5 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Why don't you try to compile the linux source to get an idea
, it can probably take days to build and compile everything. |
|
|
|
|
|
#6 | |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Quote:
|
|
|
|
|
|
|
#7 | ||
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
here's another dumb question then...why does the compiler throw a fit if i remove it?
code int main(){
return 0;}resulting error Quote:
Quote:
edit 6 minutes later... how?
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
||
|
|
|
|
|
#8 |
|
Professional Programmer
![]() Join Date: Sep 2005
Posts: 419
Rep Power: 3
![]() |
>how?
Start out with an empty project to begin with.
__________________
Even if the voices aren't real, they have some pretty good ideas. |
|
|
|
|
|
#9 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
what i meant is i just went through about 40 menus in the options dialog, and was wondering if anyone knew "off the top of their head".
i'm going to ask microsoft.
__________________
i put on my robe and wizard hat... Have you ever heard of Plato, Aristotle, Socrates?...Morons. |
|
|
|
|
|
#10 |
|
Programmer
Join Date: Jun 2005
Posts: 99
Rep Power: 4
![]() |
I think its pritty stupid that you need #include "stdafx.h" in order to compiled when precompile headers are turned on, I mean couldn't the compiler add it if it cant compile without it
.btw, stdafx.h its the default name for the precompiled header, you can change it. As for taking them off: For a project- Right click on project> Properties>c/c++>Precompiled Headers>Use precompiled headers> set to not using precompiledd headers. You can also do that for a single cpp file by right clicking on it (good for excluding third party utilities). |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|