Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com X-Envelope-To: cygwin AT sourceware DOT cygnus DOT com Message-ID: <36F66173.1F71CC18@hotmail.com> Date: Mon, 22 Mar 1999 16:27:47 +0100 From: John Mullee Organization: Ex Machina Interactive Architects X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: "Gary V. Vaughan" CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Making DLL's. References: <1 DOT 5 DOT 4 DOT 32 DOT 19990318210722 DOT 0067d298 AT lola DOT univ-lemans DOT fr> <3564 DOT 990319 AT is DOT lg DOT ua> <36F258AB DOT CC1A1788 AT atos-group DOT com> <199903191530 DOT KAA01054 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > 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: ========= NAME [application][BASE=address] LIBRARY [library][BASE=address] 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. DESCRIPTION "text" STACKSIZE reserve[,commit] SECTIONS definitions 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 section. 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. EXPORTS definitions This statement makes one or more definitions available as exports to other programs. 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. VERSION major[.minor] 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com