Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 11 Jan 2002 14:33:39 +0100 From: "Gerrit P. Haase" X-Mailer: The Bat! (v1.53t) Business Reply-To: "Gerrit P. Haase" Organization: convey Information Systems GmbH X-Priority: 3 (Normal) Message-ID: <40100646702.20020111143339@familiehaase.de> To: cygwin AT cygwin DOT com Subject: gcc/ld problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hallo Cygwinners, I'm trying to link a library with gcc -shared plus some ld options: gcc -shared -o Zlib.dll -Wl,--out-implib=libZlib.dll.a -Wl,--output-def libZlib.def -Wl,--export-all-symbols -Wl,--enable-auto-import \ -L/usr/local/lib Zlib.o /usr/local/lib/perl5/5.7.2/cygwin-multi-64int/CORE/libperl.dll.a -L/usr/local/lib -lz gcc: libZlib.def: No such file or directory Now I'm getting this error. I thought -Wl,--output-def name.def is the option to tell ld that it should create this .def file, now I'm confused, why does it tell me No such file or directory? From the ld --help output: ... --out-implib Generate import library --output-def Generate a .DEF file for the built DLL ... And the .info says: `--output-def FILE' The linker will create the file FILE which will contain a DEF file corresponding to the DLL the linker is generating. This DEF file (which should be called `*.def') may be used to create an import library with `dlltool' or may be used as a reference to automatically or implicitly exported symbols. It works well if I skip this flag. It works well if I do a: $ touch libZlib.def before running gcc -shared. Is this the expected way? Do I have to create an empty .def file before linking? Or is something with my setup broken? Do I need .def files? Gerrit -- =^..^= -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/