delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Message-ID: | <3835A171.CD413288@pentek.com> |
Date: | Fri, 19 Nov 1999 14:13:53 -0500 |
From: | "Charles Krug Jr." <charles AT pentek DOT com> |
X-Mailer: | Mozilla 4.61 [en] (WinNT; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | Re: Trouble linking against vendor supplied DLL. |
References: | <383435A3 DOT F2497AAB AT pentek DOT com> |
"Charles Krug Jr." wrote: > > Hello List: > > I'm building a program and trying to link against a vendor supplied .dll > using their .lib file. The code in question has successfully been built > under VC. I'm now attempting to build under cygwin. Okie, got it solved BUT I still find that dlltool does not correctly create the import library. Here's the makefile section that does what I needed to do. If you see any obvious shortcomings, please tell me about them. universe.def: c:/WinUni/lib/universe.lib # dlltool --export-all --output-def $@ $? # This doesn't work. I'm probably giving dlltool the # wrong options. # echo 'EXPORTS' > tmp.def -for o in $?; do \ nm --extern-only --defined-only $$o | \ sed -e 's/[^ ]* [^ ]* //' \ -e 's/^_//' \ -e 's/^_imp/imp/' \ -e 's/.*://' \ -e 's/^\..*//' \ -e '/^$$/d' | \ fgrep -v DllEntryPoint | fgrep -v DllMain | \ fgrep -v impure_ptr >> tmp.def;\ done mv tmp.def $@ libuniverse.a: universe.def dlltool --dllname c:/WINNT/system32/universe.dll --def $< \ --output-lib $@ When I invoke dlltool using the --export-all --output-def options, my resulting .def file has only the EXPORTS line. I'm probably missing a command line switch or two. The sed sequence works for the two cases I tried, but I'm open to any suggestions as to how to improve it. Charles -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |