www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/12/04:37:40

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <7A163A46C4B0D211B62300A0C9ED9352224BA7@micsrv1.mic.dtu.dk>
From: Torben Mikael Hansen <TMH AT mic DOT dtu DOT dk>
To: "'cygwin'" <cygwin AT sourceware DOT cygnus DOT com>
Subject: Linking to 3rd-party DLL
Date: Wed, 12 May 1999 10:37:35 +0100
X-MS-TNEF-Correlator: <7A163A46C4B0D211B62300A0C9ED9352224BA7 AT micsrv1 DOT mic DOT dtu DOT dk>
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.1960.3)

------ =_NextPart_000_01BE9C5B.1118D670
Content-Type: text/plain

I am having a problem linking to a third party DLL.

Linking against the applied LIB-file for MS VC causes no error at
compile-time but at when running the program causes the following
message: ...linked to missing export AXDRV32:

Producing a archive-file by

echo EXPORTS > axdrv32.def
nm axdrv32.lib | grep '^........ [T] _' | sed 's/[^_]*_//' >>
axdrv32.def
dlltool --as=as --dllname axdrv32.dll --def axdrv32.def --output-lib
axdrv32.a

and using this to link against causes the following run-time message:
...linked to missing export AXDRV32:axInitialize AT 4

Producing a archive-file by

echo EXPORTS > axdrv32.def
nm axdrv32.lib | grep '^........ [T] _' | sed 's/[^_]*_//' | sed
's/@[^.]//' >> axdrv32.def
dlltool --as=as --dllname axdrv32.dll --def axdrv32.def --output-lib
axdrv32.a

which removes the '@4' and equivalent for other functions
causes 'undefined reference' error at compile-time linking

Then removing the WINAPI (which is only recognised when it's at its own
line) from the predefinition and using the last archive file causes no
errors for a limited number of functions but of cause for more function
calls, the stack becomes corrupted and the program crashes.

Does anybody have an idea on how to solve this problem.

I'm using cygwin b20.1

The functions definition is:

WORD
WINAPI
axInitialize(LPSTR lpstrIniFile);

Thanks Torben
___________________________________________________
Mikroelektronik Centret
DTU Building 345e, DK-2800 Lyngby, Denmark

office:	157
tel:   	+45 4525 5731
fax:		+45 4588 7762
email: 	tmh AT mic DOT dtu DOT dk



------ =_NextPart_000_01BE9C5B.1118D670
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------ =_NextPart_000_01BE9C5B.1118D670--

- Raw text -


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