Re: The new prefix.h file.
Re: The new prefix.h file.
- Subject: Re: The new prefix.h file.
- From: David Rio Vierra <email@hidden>
- Date: Tue, 31 Dec 2002 08:02:25 -1000
It's a precompiled header. Put #include directives into it to include
your favorite header files. PB will compile them all at once, so that
they don't have to be recompiled for every source file that includes
them. Each target can have a precompiled header, and it is implicitly
included by every source file in that target. This greatly speeds
compile times, especially if you're using an option like
-fconstant-cfstrings which renders the existing Carbon precomps
unusable.
If you're using C++ templates, such as the STL, you won't get much
benefit unless you put template declarations like this one in your
prefix header:
class vector<char *>;
This will tell the compiler that you're going to be using vector<char
*> some time in the future, and it will whip up and precompile a vector
class that deals with char *. You have to do this, because template
classes aren't compiled unless they're actually used with template
arguments, and are compiled separately for each distinct set of
template arguments. Also, when using C++, I had to rename my prefix
header to prefix_PROJECTNAME.cpp and adjust my target settings
appropriately. I'm quite sure this all applies for Obj-C++ as well.
On Tuesday, December 31, 2002, at 07:40 AM, Colin Chicoine wrote:
When you create a new project, Project Builder creates this new
_prefix.f file what is this for?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.