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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <20030125111419.14510.qmail@web21404.mail.yahoo.com> Date: Sat, 25 Jan 2003 22:14:19 +1100 (EST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: Re:anyone have implicit linkage of gcc DLLs working in Visual C? To: cygwin AT cygwin DOT com, twest AT ee DOT washington DOT edu MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit ----------------- Todd West wrote I'm experimenting with using Cygwin and gcc -shared to build Windows DLLs which are called by code compiled by VC6.0 SP5 or the Intel C 7.0 plug-in for VC. I've using some very small stubs of test code and DLLs extracted from Atlas 3.4.1. Implicitly linked calls go down fine at compile and link time with .libs generated by gcc, but seg fault at run time. Explicit DLL linkage works fine (e.g. LoadLibrary() and GetProcAddress()); I can even make successful calls across C++ ABIs. The import libs built with GCC tools are not completely compatible with expectations of MS tools. To workaround, create a .DEF file for your nifty new gcc-built dll and use it to make a MS-style import lib. I haven't done this for awhile, but IIRC the command line is something like: lib /DEF:foo.def /OUT foo.lib Then use the foo.lib in your MSVC environemnt as you would any MS built *.lib file. Danny http://movies.yahoo.com.au - Yahoo! Movies - What's on at your local cinema? -- 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/