delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/10/05:11:17

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
From: "Dave Korn" <dk AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Creating DLL's for use with MSVC
Date: Wed, 10 Mar 2004 10:10:22 -0000
MIME-Version: 1.0
In-Reply-To: <D9B6A11B-7268-11D8-B092-000393C92B12@foi.se>
Message-ID: <NUTMEGRKLpgTFur2iz2000000e5@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 10 Mar 2004 10:10:22.0234 (UTC) FILETIME=[E6002FA0:01C40687]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Niklas Wallin
> Sent: 10 March 2004 07:59

> The problem was that I could not link my MSVC program with 
> the import library, since the symbols are decorated 
> differently. Cygwin (and I guess Linux) creates symbols like 
> "_ZN7Myclass8GetValueEv" while MSVC looks for 
> "?getValue AT MyClass@@QAEHXZ".
> The definitions file was correct however. Then I read 
> somewhere that you should produce the import library from the 
> def file using MS lib:
> 
> lib /machine:i386 /def:mydll.def
> 
> This did not work either, the symbols are of course decorated 
> the same way (cygwin way). I have also tried to use the 
> dllwrap and dlltool but all I got was empty def files, and 
> undefined references.
> 
> Please tell me I that I actually can create DLL's in Cygwin 
> and link them with MSVC. If you do that can you please tell 
> me how. I spent yesterday reading and reading, compiling and 
> linking but without any success.


  Well, it may seem like cheating, but unless you desparately need to export
actually overloaded functions, why not just extern "C" the whole lot of it
and be done with it ?



    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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