gzread, gzdopen, gzclose not found

Brian Dessent brian@dessent.net
Sun Dec 4 01:42:00 GMT 2005


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/libclanApp.so.$(D_VERSION_MINOR) $(OBJF_LIB_App) -L Libs -lz -lclanCore
>         @ln -s -f libclanApp.so.$(D_VERSION_MINOR)
> Libs/libclanApp.so.$(D_VERSION_MAJOR)
>         @ln -s -f libclanApp.so.$(D_VERSION_MAJOR) Libs/libclanApp.so
> 
> 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 libfoo.so.x.y
- 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.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list