This is the mail archive of the cygwin-apps@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: NCurses-5.0


Earnie Boyd wrote:
> 
> --- "Charles S. Wilson" <cwilson@ece.gatech.edu> wrote:
> -8<-
[snip]
> >
> -8<-
> 
> Paul Sokolovsky has this nice a2dll script to create a dll from a static lib.
> I've been playing with it today with readline-4.1 and have found it to be
> useful.  I modified his naming scheme so that the static library becomes
> libfoo_s.a, libfoo.a is a symbolic link to foo.dll and libfoo.dll.a is the
> import library.  I don't know that this is the best idea yet.  With the
> symbolic link the linker builds the executable but the executable just exits
> without doing anything.  With using the dll directly, ie specifying
> readline.dll on the command line as an input file, the linker builds the
> executable but some of the examples stackdump, some of the examples complain of
> missing routines and some work.  They all work with the static library of
> course.
> 

use cygcheck to analyze the executable. I messed with symlinks a little
bit, and found that ld used the name of the symlink as the embedded
dll-name in the executable. e.g:

/usr/bin/z.dll
/usr/bin/libz.dll (identical copies of the same file)
/usr/lib/z.dll -> /usr/bin/libz.dll

gcc -o minigzip.exe minigzip.o -L/usr/lib -lz
(This will link using the /usr/lib/z.dll symlink)

cygcheck minigzip.exe
[ lots of cygwin & windows dll's ]
/usr/bin/z.dll !!!!

So, I suspect that if you use 'libfoo.a --> foo.dll' then the executable
will have 'libfoo.a' embedded as the dll-name to hunt for; and windows
will not find it.


> > > If this can be resolved soon, then we should wait.  Should we put it up
> > > for a vote?  Or is cygwin-apps too new for this to be useful?
> > >
> >
> 
> As long as it works, makes life easier to have a choice of static versus
> dynamic, and is close to what people are used to in unix I don't think anyone
> is going to complain.
> 
> How about using this naming scheme?  It looks right and comes close to being
> "real".
> 
> libfoo.a == static library
> libfoo.so == sybolic link to foo.dll
> libfoo.dll.a == import library

see above.

> 
> Chuck, I'm willing to test your binutils changes.  Just let me know where I can
> find a distro.
> 

I'll upload ld.exe/collect2.exe/specs tonight & let you know where to
find it.

--Chuck

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]