Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C758BFA.2A1537AF@etr-usa.com> Date: Thu, 21 Feb 2002 17:08:26 -0700 From: Warren Young Organization: -ENOENT X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Cygwin-L Subject: Re: DLLs that can be used with MS C++ References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dan Kyhl wrote: > > Are you saying that I can't make C++ dll's in cygwin for use in 'normal' > Windows? No, because every C++ compiler "mangles" identifiers differently. Name mangling is considered by many to be a feature. Even your own company's C++ compilers probably mangle names differently from VC++ and g++. They may even mangle names differently from _each other_. Now, if you're not trying to call methods, but instead calling plain ol' functions that don't take objects or pointers to objects as parameters, you can prefix the functions with 'extern "C"' and it will export those names unmangled. Such functions can use objects internally, but you can't pass them in and out because object layout might be different between your two compilers. > There's not even a native gcc for Windows? mingw qualifies, but the name mangling issue still pertains, since underneath it's still g++. This is not a "Windows" issue, it's a compiler issue. Other native Windows compilers -- including IBM VisualAge -- don't interoperate with each other at the C++ level. This is one reason why COM, .NET and Java exist. They define a single object model so cross-language and cross-tool calls work right. It's also why there is no C++ API for Windows. This is getting pretty far afield from Cygwin, though. If you want to take it up further, you should probably go to comp.lang.c++{.std} or reply by private email. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/