This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: Relocatable DLLs
- To: JSONCRAIG@aol.com
- Subject: Re: Relocatable DLLs
- From: Mumit Khan <firstname.lastname@example.org.EDU>
- Date: Tue, 30 Mar 1999 20:24:32 -0600
- cc: email@example.com
> I searched for this but couldn't find anything on it.
> When I try to link my dll that has a function that uses iostream (I'm linking
> -lstdc++ with it) I get a bunch of undefined references like "undefined
> refernece to isspace". I don't know what I'm doing wrong...heres the ld
> ld -s --base-file foo.base --dll -o foo.dll foo.o -lstdc++ -e _dllEntry@12
> Can anyone help?
First of all, I suggest looking at the README file and the examples that
come with dllhelpers package. It would've answered your question right
away. See http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ for more
If you insist on using "ld" to link, then you must know all the other
libraries that are needed, as well as other options that language drivers,
such as gcc and c++, pass on to ld. In this particular case, you're
I suggest you use c++ to do the job. To make your life easier, just use
dllwrap and be done with it.
$ dllwrap -o foo.dll --driver-name=c++ --entry _dllEntry@12 foo.o
$ dllwrap -o foo.dll --entry _dllEntry@12 foo.o -lstdc++
Will build a relocatable DLL (ie., run all 5 passes) for you. Since you're
not specifying a DEF file, I'm assuming that you've used dllexport
attribute in all places necessary. For C++ code, you almost always have to
use --export-all to export everything needed (some are due to bugs and
misfeatures in GCC's dllexport attribute).
$ dllwrap -o foo.dll --export-all --implib=libfoo.a \
--entry _dllEntry@12 foo.o -lstdc++
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org