delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/07/07/15:46:36

From: pjm AT rbd DOT com ("Paul J. Metzger")
Subject: Re: MSVC linker
7 Jul 1997 15:46:36 -0700 :
Sender: mail AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <Pine.LNX.3.91.970707112233.16490F-100000.cygnus.gnu-win32@thunder.rbd.com>
Original-To: root <root AT jacob DOT remcomp DOT fr>
Original-cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <m0wl9aJ-000AK5C@jacob.remcomp.fr>
MIME-Version: 1.0
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Jacob,

> What means for you linking MSVC code with cygnus code?
> 
> When you write your hello world program, you suppose that
> the startup code has already initialized stdio and stderr, and all
> that for you isn't it?
> 
> Well, this is done generally in the startup code that is called by the
> system. That code will initialize those variables (and do some other
> things) and THEN call _mainb,or _WinMain, or whatever the user entry
> point is.
> 
> This is the reason you do not see anything when you try your
> hello world program.
> 
> Question:
> You want to use cygnu's or MSVC startup?
> Related question:
> You will use the cygnus or the MSVC version of 'printf'?

My ultimate objective is to link existing .lib files compiled with
MSVC with Unix code ported to NT via the GNU Win32 environment.  It
doesn't matter to me if the startup code is cygnus or MSVC.  Likewise,
it doesn't matter whose 'printf' (and similar functions) I use.

> Normally, linking objects of two diferent compiler systems will seldom
> work unless both compilers are binary compatible and run time
> library compatible. This is NEVER possible when using C++ due to
> name mangling. This is seldom possible in C due to library differences.

I understand the issue about C++ as well as the general issues about
compiler differences.  As others have commented, the FAQ for the Cygnus
stuff clearly indicates that it's possible to have code from the two
environments co-exist.  Obviously somebody must have figured out how
to get something running, and I'm just trying to do the same.  I'll try
to patch to 'gas' to see if that helps.

> You would have more chances with the minimalist version of gcc
> or with lcc.

Unless I'm mistaken, both of these options lose the Unix emulation
layer, which I need for the libraries I'm trying to port.

						- Paul


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Reality by Design, Inc.                      Tel:  (617) 942-0440
 95 Main Street, Suite 3                      Fax:  (617) 944-6209
 Reading, MA  01867-3965                      URL:  www.rbd.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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