Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Originating-IP: [131.120.98.43] From: "Nicholas Peters" To: cygwin AT cygwin DOT com Subject: Linking Cygwin & MSVC objects / libraries using MSVC linker Date: Mon, 23 Apr 2001 19:59:18 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 24 Apr 2001 00:59:19.0034 (UTC) FILETIME=[CAA4FDA0:01C0CC59] Is it possible to link Cygwin compiled objects and Microsoft Visual C (not C++) objects using the libcygwin.a and it's associated libraries and Microsofts various libraries (MSVCRT, etc). I would very much like to use the MSVC linker for this (not ld) but am open to all ideas. When I tried to just flat out link (with MSVC linker) I got some errors from libcygwin.a stating it had undefined external references to data_start, data_end, bss_start, bss_end. After reading through some of the mail archives for this list I decided to throw in some null char declarations for those references since I'm not using the fork functionality of libcygwin. I get two warnings in the link, and the resulting exe crashes. The warnings are: libcygwin.a : warning multiple ".idata" sections found with different attributes. libcygwin.a : warning __fmode already defined in MSVCRT.LIB second definition ignored. When I list libcygwin.a BEFORE MSVCRT in my link command line, the second warning changes to: MSVCRT.LIB : warning _atexit already defined in libcygwin.a second definition ignored. Either way the the produced executable crashes with "The instruction at
referenced memory at
. The memory could not be "read". " A message in the archives had a similar problem: http://sources.redhat.com/ml/cygwin/1997-12/msg00071.html but the author didn't get a reply as far as I can tell, so I thought I'd try my luck. If you need more info just let me know, any help is appreciated. Nick Peters _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple