delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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: | <3EA2AE5B.6040409@kegel.com> |
Date: | Sun, 20 Apr 2003 07:27:39 -0700 |
From: | Dan Kegel <dank AT kegel DOT com> |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 |
X-Accept-Language: | de-de, en |
MIME-Version: | 1.0 |
To: | David Starks-Browning <david AT starks-browning DOT com> |
CC: | cygwin AT cygwin DOT com |
Subject: | Re: .dll question |
References: | <3D9B1B11 DOT 16005 DOT 3D0BDC AT localhost> <1033600781 DOT 14524 DOT 221 DOT camel AT lifelesswks> <8041-Sun20Apr2003145627+0100-david AT starks-browning DOT com> |
In-Reply-To: | <8041-Sun20Apr2003145627+0100-david@starks-browning.com> |
David Starks-Browning wrote: >>> On a related note, can Cygwin generate c++ .dlls which are loadable by msvc++ or >>>does Microsofts' method of name mangling prohibit such things? >> >>No it can't. In general, C++ compilers don't interoperate. The C++-Lite >>FAQ has a section on this. >> >>>From memory, the issues are: >>*name mangling >>*VMT layout >>*new[] management >>*exception handling >> >>If you want to use cygwin C++ from MSVC, write some C bindings for the >>code. > > ... All the FAQ says about this is the following: > > Q. Can I mix objects compiled with msvc++ and gcc? > > A. Yes, but only if you are combining C object files. MSVC C++ uses > a different mangling scheme than GNU C++, so you will have > difficulties combining C++ objects. > > I'd like to include the extra detail that Robert goes into, if it's > correct. Does anyone know for sure? Any discussion of these issues isn't complete without mentioning the fact that you can't even mix objects compiled by gcc2.x and gcc3.x. This was caused by the switchover as of gcc3.x to the standard C++ ABI defined at http://www.codesourcery.com/cxx-abi/ That document defines very carefully all the issues Robert writes about, I think. All C++ compilers for Linux should now be following that standard. See also http://gcc.gnu.org/gcc-3.2/c++-abi.html Also, I have some extra detail about name mangling in MSVC6 and gcc2.x at http://www.kegel.com/mangle.html It's three years old but may still be useful. - Dan -- Dan Kegel http://www.kegel.com http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045 -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |