From: Jeremy Dreese <jdreese@bucknell.edu>
To: cygwin@sourceware.cygnus.com
Subject: Re: dll and import library
Date: Wed, 05 Apr 2000 08:04:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.03.10004051036320.12138-100000@castor> (raw)
Well, thanks to someone else on the list, it was pointed out to me that I
didn't include the actual error messages the linker was giving me.
However, in the process of preparing to send the errors to the list, I may
have found the solution to my problem. Here are the errors:
prmtrc.o(.text+0xcc):prmtrc.f: undefined reference to `engopen_'
prmtrc.o(.text+0x25c):prmtrc.f: undefined reference to `engclose_'
plot.o(.text+0x2148):plot.f: undefined reference to `engevalstring_'
plot.o(.text+0x2206):plot.f: undefined reference to `engevalstring_'
(prmtrc.o and plot.o are two of my object files)
I had tried changing my libeng.def file to something like:
-------------
EXPORTS
engOpen=engopen_
engClose=engclose_
engEvalString=engevalstring_
--------------
but that didn't seem to help. But I just tried changing it to:
-------------
EXPORTS
engopen_
engclose_
engevalstring_
--------------
which fixed my linking problem; this seems a little odd to me since the
function names are "engOpen, engClose, and engEvalString" and not
"engopen_, engclose_, and engevalstring_", but I am a little new to this.
Of course now I get a runtime error:
"The program_name is linked to the missing export LIBENG.DLL:engclose_"
I'm guessing that just means the program can't find the libeng.dll file,
so I'll plug away at this problem myself.
Thanks,
Jeremy
---------- Forwarded message ----------
Date: Wed, 5 Apr 2000 10:17:05 -0400 (EDT)
From: Jeremy Dreese <jdreese@bucknell.edu>
To: cygwin@sourceware.cygnus.com
Subject: dll and import library
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@sourceware.cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
next reply other threads:[~2000-04-05 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-05 8:04 Jeremy Dreese [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-05 11:27 number6
2000-04-05 7:17 Jeremy Dreese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.03.10004051036320.12138-100000@castor \
--to=jdreese@bucknell.edu \
--cc=cygwin@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).