delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/11/10:38:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <78a9ab5d05031107377b3148e4@mail.gmail.com>
Date: Fri, 11 Mar 2005 16:37:36 +0100
From: "RzR www.rzr.online.fr" <www DOT rzr DOT online DOT fr AT gmail DOT com>
Reply-To:
To: cygwin AT cygwin DOT com
Subject: gcc/ ld/ Mixing C++ objects from gcc and msvc : possible link ?
In-Reply-To: <422F63F7.2080100@buddydog.org>
Mime-Version: 1.0
References: <20050309173223 DOT 505222101B7 AT warserver DOT warande DOT net> <20050309173442 DOT GB16830 AT gully DOT bosbc DOT com> <422F4DBA DOT 7020501 AT buddydog DOT org> <20050309200112 DOT GA17199 AT gully DOT bosbc DOT com> <422F63F7 DOT 2080100 AT buddydog DOT org>
X-IsSubscribed: yes

> > A foo.lib can be used interchangeably with a libfoo.a file.  Except
Yea I did not realize that was just a convention (I was also confused
on cygwin :  .so vs .dll)

> > for the well-documented and frequently repeated problems with C++
> > name mangling, and the even more repeated problems with mixing
> > the cygwin and msvcrt runtime libraries, there should be no problems
> > with using a .lib file on the gcc command line or a .a file on the
> > "cl" command line.
> ==
> You cannot intermix non-trivial C++ (and, in many cases, even C) object
> files between compilers.
> ==
> 
> I'm not saying that it can't be done in some specialized circumstances,
... if it is not impossible, let's do it :)

> for some short period of time.  But before long, you *will* get bitten
> by an incompatiblity. The Standard says nothing about object file formats,
> internal structures, name-mangling, stack usage, and so on.  And that
But I suppose other compiler firms had access to MSVC standards didn't they ?

> nearly guarantees disaster.
Yea I experienced in a short sample  those differents C++ name mangling 
( http://rzr.online.fr/q/nm )

But can usage of dynamic libs workaround that ?

http://cygwin.com/cygwin-ug-net/dll.html#dll-build works only for C
names i guess ?

But for C++ names, I doubt GCC can write a compatible MSVC "library
stub" ( XYZ.lib that goes along XYZ.dll, not a static one : libXYZ.lib
)


Maybe runtime linking with a dll  is possible ... I am investigating on this... 

-- 
Current Obsession : http://rzr.online.fr/q/GCC

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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