This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Re: Making DLL's.
> That is I need to make sure that any data item that will be imported from a
> dll has __attribute__((dllimport)), and any data item imported from a static
> library cannot have this attribute. Obviously, in a makefile driven build
Normally, in win32, this has to be specified manually -
with default being 'not exported'.
RTFM for ".def" files:
This statement tells LINK to create a DLL. At the same time, LINK
creates an import library, unless an .EXP file is used in the build.
This statement sets attributes for one or more sections in the image
file. It can be used to override the default attributes for each type of
SECTIONS marks the beginning of a list of section definitions. Each
definition must be on a separate line. The SECTIONS keyword can be on
the same line as the first definition or on a preceding line. The .DEF
file can contain one or more SECTIONS statements. The SEGMENTS keyword
is supported as a synonym for SECTIONS.
The syntax for a section definition is:
section [CLASS 'classname'] attributes
The section name is case sensitive. The CLASS keyword is supported for
compatibility, but is ignored. The attributes are one or more of the
following: EXECUTE, READ, SHARED, and WRITE.
This statement makes one or more definitions available as exports to
EXPORTS marks the beginning of a list of export definitions. Each
definition must be on a separate line. The EXPORTS keyword can be on the
same line as the first definition or on a preceding line. The .DEF file
can contain one or more EXPORTS statements.
The syntax for an export definition is:
entryname[=internalname] [@ordinal[NONAME]] [DATA] [PRIVATE]
The optional keyword PRIVATE tells IMPLIB to ignore the definition.
PRIVATE prevents entryname from being placed in the import library. The
keyword has no effect on LINK.
There are three methods for exporting a definition, listed in
recommended order of use:
The __declspec(dllexport) keyword in the source code
An /EXPORT specification in a LINK command
An EXPORTS statement in a .DEF file
All three methods can be used in the same program. When LINK builds a
program that contains exports, it also creates an import library, unless
an .EXP file is used in the build.
This statement tells LINK to put a number in the header of the .EXE file
or DLL. The major and minor arguments are decimal numbers in the range 0
through 65,535. The default is version 0.0.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org