delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/11/26/05:38:59

From: sos AT buggy DOT prospect DOT com DOT ru (Sergey Okhapkin)
Subject: Import libraries for MSVC++ compiled dlls
26 Nov 1997 05:38:59 -0800 :
Message-ID: <01BCF9FA.2949E4A0.cygnus.gnu-win32@sos>
To: "'Mike Price'" <price AT cvs DOT openbsd DOT org>,
"'gnu-win32'"
<gnu-win32 AT cygnus DOT com>

Hi!

It seems to me, it's possible to use gcc compiler with msvc++ compiled 
dlls. The def file for a dll must have the following form:

LIBRARY msvc_library
EXPORTS
gcc_mangled_name1=msvc_mangled_name1
gcc_mangled_name2=msvc_mangled_name2
....

I compiled a working demangler for msvc++ (download 
ftp://ftp.microsoft.com/softlib/mslfiles/bsc200.exe, you'll need msvc to 
use this library):

bash$ nm MFC40.LIB|sed -n '/^........ [T] /s/^........ [T] 
//p'|./unmangle.exe

AFX_CLASSINIT::AFX_CLASSINIT(struct CRuntimeClass *)
AFX_DDPDATA::AFX_DDPDATA(void *,int,int,void *,unsigned int,char const *)
AFX_EXCEPTION_LINK::AFX_EXCEPTION_LINK()
AFX_MODULE_PROCESS_STATE::AFX_MODULE_PROCESS_STATE()
AFX_MODULE_STATE::AFX_MODULE_STATE(int,long (*)(struct HWND__ *,unsigned 
int,uns
igned int,long),unsigned long)
AFX_MODULE_STATE::AFX_MODULE_STATE(int,long (*)(struct HWND__ *,unsigned 
int,uns
igned int,long),unsigned long,int)
AFX_MODULE_THREAD_STATE::AFX_MODULE_THREAD_STATE()
CAnimateCtrl::CAnimateCtrl()
CArchive::CArchive(class CFile *,unsigned int,int,void *)
CArchivePropExchange::CArchivePropExchange(class CArchive &)
CArchiveStream::CArchiveStream(class CArchive *)
CAsyncSocket::CAsyncSocket()
CBitmap::CBitmap()
CBitmapButton::CBitmapButton()
CBlobProperty::CBlobProperty(void *)
CBrush::CBrush(int,unsigned long)
CBrush::CBrush(unsigned long)
CBrush::CBrush(class CBitmap *)
CBrush::CBrush()
CButton::CButton()
CByteArray::CByteArray()
CCheckListBox::CCheckListBox()
....

Now we need a gcc-compatible mangler. Any ideas?

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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