This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: gzread, gzdopen, gzclose not found

Robert Body wrote:

> I have been asking on the clanlib mailing list... waiting... asking other
> questions... looking on internet, mailing list archives... from the last
> email which you might not have seen prior to your reply, I found  this
> Libs/$(D_VERSION_MINOR) $(OBJF_LIB_App) -L Libs -lz -lclanCore
>         @ln -s -f$(D_VERSION_MINOR)
>         @ln -s -f$(D_VERSION_MAJOR) Libs/
> and now i just put the -lz there, but it's not the right spot
> and I don't know what a right spot is, and why is "-lz" enough? i would
> think to put /usr/lib somewhere

/usr/lib is searched by default.  All you need is -lfoo if the import
library /usr/lib/libfoo.a (or .dll.a) exists.

You're probably going to have a lot more to do than just add -lz
though.  All of that stuff in the makefile that you've pasted is
linux-specific and won't work under Cygwin.  Under cygwin:

- shared libraries have extension .DLL not .so
- shared libraries have the prefix "cyg" not "lib"
- shared libraries must be versioned as cygfoo-n.dll not
- shared libraries cannot be symlinked
- flags such as -rpath and -soname are meaningless
- shared libraries are installed in /usr/bin, not /usr/lib (with the
import library in /usr/lib so that the normal -lfoo lookup still works)
- shared libraries cannot have undefined symbols at link time, as there
is no "lazy" linking as on linux.  This means on linux if you screw up
the order of -lfoo or omit -lfoo it's no big deal since it can be
resolved at runtime, but this is not the case under win32.

In short, the makefile you have is just not portable because it assumes
linux.  This is precisely why libtool exists, to abstract away all this
stuff so that the software builds everywhere, regardless of all these
sorts of differences.  From the fact that you've posted on their mailing
list with no reply would seem to imply that they are simply linux
zealots and don't care about portability to any other system, so telling
them they should use libtool will probably have no effect.


Unsubscribe info:
Problem reports:

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