delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/04/13:43:07

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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: Paul Bowyer <pbowyer AT olynet DOT com>
To: cygwin AT cygwin DOT com
Subject: Questions regarding dlltool and linking to MSVC dll
Date: Fri, 4 Jun 2004 10:45:01 -0700
User-Agent: KMail/1.5.4
MIME-Version: 1.0
Message-Id: <200406041045.01849.pbowyer@olynet.com>

Hello:

I've been trying to use dlltool to generate an import library to link to a 
MSVC 6.0 generated dll (libmySQL.dll) with only partial success. The dll has 
been stripped so I ran a copy of pexports.exe, version 0.43, against it to 
produce a .def file with all of the stdcall @nn additions to the export 
listings by referencing the include files that come with the source code.

I then ran dlltool with that .def file to produce the import library 
(libmysql.a). I then compiled/linked the c program (mytest.c) against the 
import library, which, after some trial and error, was successful. When I try 
to run the executable produced, I get an error message: MYTEST.EXE file is 
linked to missing export LIBMYSQL.DLL:mysql_close AT 4. So even though I have a 
successful compilation and link, I do not have a useable program. Is there 
something that I can do at this point to produce a useable executable?

I've searched the mail archives to see if there was something that applied to 
my situation but there were no exact matches. I did find a few references to 
being unable to link to MSVC generated libraries, but that doesn't seem to 
apply here since I've been able to link without any unresolved references.

By the way, my reason for wanting to do this is because I only have MSVC 5.0 
and the source code requires at least version 6.0 to compile successfully. I 
may be able to get version 6.0 soon, but I still wanted to be able to use 
Cygwin tools to produce Windows applications using Microsoft libraries.

Thanks for any help that may be provided.

Paul Bowyer,   pbowyer AT olynet DOT com


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