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 Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Paul Bowyer 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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/