delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/27/17:11:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Todd West" <twest AT ee DOT washington DOT edu>
To: <cygwin AT cygwin DOT com>
Subject: RE: anyone have implicit linkage of gcc DLLs working in Visual C?
Date: Mon, 27 Jan 2003 14:11:11 -0800
Message-ID: <KFEGLAIFLCHBEMHFJFDNIEFHCAAA.twest@ee.washington.edu>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
In-Reply-To: <20030125111419.14510.qmail@web21404.mail.yahoo.com>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
X-EE-Scanned: by amavisd-milter

> lib /DEF:foo.def /OUT foo.lib

Hey, thanks!  After a little reverse engineering to verify VC's lib.exe
produces .libs which reference a DLL of the same name as the .def (e.g.
foo.dll) I've got this working.

For reference, the syntax I'm using to build and link Atlas is

gcc -mno-cygwin -shared -o ${dllname} ${defname} \
    ${input_libraries} \
    -Wl,--out-implib=${gcclibname} \
    -Wl,--enable-auto-import \
    -Wl,--no-whole-archive ${clib}
LIBPATH=`cygpath -d "C:\Program Files\Microsoft Visual Studio\VC98\bin"`
VBPATH=`cygpath -d "C:\Program Files\Microsoft Visual
Studio\Common\MSDev98\Bin"`
PATH="${PATH};${VBPATH};${LIBPATH}"
lib /DEF:${defname} /MACHINE:IX86 /OUT:${msvclibname}

and implicit linkage against the import library created by lib in Visual C++
is behaving correctly so far.  However, I haven't yet tested this out
thoroughly.

Todd


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019