delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/04/05/10:18:45

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
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
Date: Wed, 5 Apr 2000 10:17:05 -0400 (EDT)
From: Jeremy Dreese <jdreese AT bucknell DOT edu>
X-Sender: jdreese AT castor
To: cygwin AT sourceware DOT cygnus DOT com
Subject: dll and import library
Message-ID: <Pine.GSO.4.03.10004050954250.12025-100000@castor>
MIME-Version: 1.0

I am trying to get a fortran program, which currently runs under Solaris,
to compile, link, and run on Windows (98 to be exact). The code compiles
fine using g77.  However, the linking has been a problem because it uses
some Matlab libraries.  Matlab ships the libraries as stripped DLL's for
windows; since they're stripped I can't use "nm" to get the symbols to
export, but I can use "objdump -p" which worked fine. I've tried to use
dlltool to create an import library (.a file); the creation of the library
seems to work fine, but when I try to link the various objects, I still
get unresolved references (which should be resolved via the import
library).  Here's what I'm doing:

libeng.def file:
-----------------
EXPORTS
FENGCLOSE
FENGEVALSTRING
FENGGETARRAY
FENGGETFULL
FENGGETMATRIX
FENGOPEN
FENGOUTPUTBUFFER
FENGPUTARRAY
FENGPUTFULL
FENGPUTMATRIX
engClose
engEvalString
engGetArray
engGetFull
engOpen
engOpenSingleUse
engOpenV4
engOutputBuffer
engPutArray
engPutFull
engSetEvalCallback
engSetEvalTimeout
engWinInit
------------------

Now I run:

dlltool --input-def libeng.def --dllname libeng.dll --output-lib libeng.a

which creates the "libeng.a".

Now I try to link everything:

ld -o program_name $(OBJECTS) -leng $(OTHER_LIBRARIES)

I'm pretty sure the linker is seeing the libeng.a because if I
change "-leng" to something incorrect like "-len" it reports that it can't
open "-len".

Any help would be GREATLY appreciated.


------------
Jeremy Dreese




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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