This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: MSVC linker


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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]