|
제 답변은 아니지만..
The extern means what it has always meant in c++, that the statment is
essentially a prototype, and not a definition. The statement extern
TForm* Form1 tells the compiler that there is a variable out there, and
that it is a TForm1 pointer, but the statment does not allocate any
storage for the variable. That is done in a cpp file. Look in the CPP
source file for Form1 and you will see something like this:
TForm1 *Form1;
This is where the variable is actually defined. The extern declaration
is simliar to how a class declaration works.
header file
extern TForm1* Form1;
class A
{
public:
A();
};
cpp source file
TForm1* Form1;
A::A()
{
}
Harold Howe [TeamB]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
In the file sysdefs.h, found in the Include\Vcl folder, PACKAGE is defined
as follows:
#define PACKAGE __declspec(package)
I quote the following from the "Using C++ Builder" help file:
__declspec(package)
The package argument indicates that the code defining the class can be
compiled in a package. This modifier is auto-generated by the compiler when
creating packages in the IDE.
<and:>
The PACKAGE macro expands to a statement that allows classes to be imported
and exported from the resulting BPL file.
If you use the New Component wizard to create components (by choosing
Comnponent|New Component), C++Builder inserts the PACKAGE macro where it is
needed. But if you have custom components from an older version of
C++Builder, you뭠l have to add PACKAGE manually in the two places just
mentioned. <end of quotation>
FF
윤종희 님이 쓰신 글 :
: PACKAGE를 help에서 찾아보니 __declspec(package) 인거 같더군요.
:
:
: __declspec(package)
:
: The package argument indicates that the code defining the class can be compiled in a package. This modifier is auto-generated by the compiler when creating packages in the IDE.
:
: 라고 나와 있던데...제대로 찾은거 맞나요? ^^;;
:
: 만약 맞다면, 내용 중에서 ' the code defining the class can be compiled in a package. ' 이 무슨 뜻인지 모르겠어요.
:
: 행복하세요.
:
: 24살 늦은 여름 [# 윤종희 #]
:
:
|