Subject: RE: Using/Importing Libraries in Cygwin
From: "Ralf Habacker" <[email-masked]>
To: "Piyush Kumar" <[email-masked]>
Cc: "Cygwin" <[email-masked]>
Date: Sun, 21 Oct 2001 10:29:43 +0200

> I have a question, excuse me if it has already been answered!
>
> Borland supplies a utility that converts Microsoft Visual C++ .lib
> library files into Borland compatible files.  Is there something of
> that sort available for cygwin?? Can DLL files be used to extract
> libxxx.a files?? Is some command already available to do it?
>
> If something of that sort is available, It would be of great help
> in porting stuff that runs on "only windows!!".
>
> Thanks for your help in advance,
> --Piyush
>
> PS: If it has already been answered , or u know of a place where I
> could read about this stuff, could you please just send me a personal
> mail wihh a link in the reply email.
>
A few weeks ago I have started writing a demangler for msvc++ libraries.
The reason for this was to look how it is possible to link the windows native
qt 2.3.0 lib with a g++ compiled kde2.
I have used a flex scanner and a bison parser to build the demangling rules.
It demangles already about 35% of the symbols (I have used the qt 2.3.0 lib
with about 6000 symbols), but because of my small resources I has stopped
this task for the next time.
Generell the demangler works but the ms name mangling schema has very much
exceptions, which has to be emulated in the parser.

Additional there are some topic which has to be solved too:

1. Virtual table handling - This is incompatible between the different vendors.
   A possible solution might be to create a specific import library (as used
   for the auto-import feature) with thunks, which emulates the needed vtable
format.

2. different register/stack layout
   This could be solved too by specific thunks in the import library, but has to
   figured out first.

3. RTTY - Run time type information
   This has to be inspected because it's safe to say that there are differences
   This might be solved too by specific thunks in the import library.

So if someone like to be involved in this task here are some links relating
using vendor specific c++ libs:

Where can I get information about the C++ compiler from {Borland, IBM,
Microsoft, Semantic, Sun, etc.}?
http://new-brunswick.net/workshop/c++/faq/compiler-dependencies.html#[33.4]

3043 How to call a C++ member function in a DLL
http://www.xploiter.com/programming/c/borland/3043.html

Using Visual C++ DLLs in a C++Builder Project
http://www.bcbdev.com/articles/vcdll.htm

Borland C++ Name-Mangling
http://users.erols.com/johnrobertcollins/bcppmngl.html

Issue calling Com function(s)
http://sources.redhat.com/ml/cygwin/2001-06/msg00716.html

Microsoft Fundamentals C++ Name mangling
http://www.devx.com/upload/free/features/vcdj/2000/12dec00/fu0012/fu0012_6.asp

COM-DLL with cygwin c++
http://sources.redhat.com/ml/cygwin/2001-07/msg00751.html

Some aspects of Borland versus microsoft name mangling schema
http://www.microsoft.com/msj/defaulttop.asp?page=/msj/archive/s330.htm

> --
> 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/
>
>

--
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/