[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


precompile_target

Description:

Specifies the file name for a precompiled header file.

Compatibility:

This pragma is compatible with the following platform targets:

68K

PowerPC

NEC V800

Intel x86

MIPS

Embedded 68K

Prototype:
  #pragma precompile_target filename Remarks:

NOTE

This pragma is not supported on Be OS.

This pragma specifies the filename for a precompiled header file. If you don't specify the filename, the compiler gives the precompiled header file the same name as its source file.

Filename can be a simple filename or an absolute pathname. If filename is a simple filename, the compiler saves the file in the same folder as the source file. If filename is a path name, the compiler saves the file in the specified folder.

Listing 8.12 shows sample source code from the MacHeaders precompiled header source file. By using the predefined symbols __cplusplus and powerc and the pragma precompile_target, the compiler can use the same source code to create different precompiled header files for C and C++, 680x0 and PowerPC.

Using #pragma precompile_target filename:
#ifdef __cplusplus
 #ifdef powerc
  #pragma precompile_target "MacHeadersPPC++"
 #else
  #pragma precompile_target "MacHeaders68K++"
 #endif
#else
 #ifdef powerc
  #pragma precompile_target "MacHeadersPPC"
 #else
  #pragma precompile_target "MacHeaders68K"
 #endif
#endif


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000