Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Todd West" <twest@ee.washington.edu>
To: <cygwin@cygwin.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
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
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/

