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

Description:
Controls or specifies the availability of imported symbols.
Compatibility:
This pragma is compatible with the following platform targets:
Prototype:
#pragma import on | off | reset | list names
Remarks:
This pragma applies to Mac OS CFM programming only.
This pragma lets you import variables and functions that are in other fragments. Use this to import symbols that have been exported with the export pragma, an .exp file, or the Export Symbols menu in the CFM68K and PPC PEF settings panel.
If you want to import all the functions and variables declared or define within a certain range, use #pragma import on at the beginning of the range and use #pragma import off at the end of the range. If you want to import all the functions and variables in a list, use #pragma import list. If you want to import a single variable or function, use __declspec(external) at the beginning of the declaration
For example, this code uses #pragma import on and off to import the variable w and the functions a1() and b1():
#pragma import on
int a1(int x, double y);
double b1(int z);
int w;
#pragma import off
This code fragment use #pragma import list to import the symbols:
int a1(int x, double y);
double b1(int z);
int w;
#pragma import list a1, b1, w
And this code fragment uses __declspec(import) to import the symbols:
__declspec(import) int a1(int x, double y);
__declspec(import) double b1(int z);
__declspec(import) int w;
This pragma does not correspond to an option in any settings panel. To check whether this option is on, use __option (import), described in "Checking Options."
[ 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