This is the mail archive of the
mailing list for the Cygwin project.
RE: Linking Cygwin & MSVC objects / libraries using MSVC linker
- To: "Nicholas Peters" <nickapeters at hotmail dot com>,<cygwin at cygwin dot com>
- Subject: RE: Linking Cygwin & MSVC objects / libraries using MSVC linker
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- Date: Tue, 24 Apr 2001 10:55:15 +1000
- Thread-Index: AcDMWMkqgpBmf7oeRhSs79pzgdcAzwAABfdw
- Thread-Topic: Linking Cygwin & MSVC objects / libraries using MSVC linker
> -----Original Message-----
> From: Nicholas Peters [mailto:email@example.com]
> Sent: Tuesday, April 24, 2001 10:59 AM
> To: firstname.lastname@example.org
> Subject: Linking Cygwin & MSVC objects / libraries using MSVC linker
> 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
lybcygwin.a is mainly an import lib for cygwin1.dll aka libm aka libc
aka lpthread aka I'm not shure howmanyotherlibraries.
> 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
> 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
> <address> referenced memory at <address>. The memory could
> not be "read". "
AFAIK you cannot mix MSVCRT.LIB and libcygwin.a. They implement the same
functions. What do you need from cygwin?
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple