Farid Zaripov wrote:
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 06, 2007 7:23 PM
To: [email protected]
Subject: Re: [PATCH] RE: Cygwin cannot find -lstd12d

+# generate import library on Cygwin
+#ifneq ($(findstring CYGWIN,$(OSNAME)),)
+  LDFLAGS += -Wl,--out-implib,lib$(LIBBASE).a #endif
Should this be LDFLAGS (linker flags used when linking programs with the library) or LDSOFLAGS (linker flags used only when linking a shared library)?

  Yes, using the LDSOFLAGS is more correctly.

  But in this case using both variables have the same effect because the
linker used only when shared library built.

Okay, so --out-implib is only needed/allowed when creating
the library. http://www.mingw.org/docs.shtml has an example
of how to create a shared library on MinGW. It uses the .dll
suffix rather than .so for the name of the library. We have
.so. Should the name of our library be changed to .dll or
does it matter? (I'm sure it would matter if the user wanted
to link the shared library in a program using MSVC.)

If you've successfully tested your patch with at least a few
of the stdcxx example programs please go ahead and commit it.
We can deal with the suffix later.

Martin


  The corrected patch:

Index: GNUmakefile.lib
===================================================================
--- GNUmakefile.lib     (revision 514746)
+++ GNUmakefile.lib     (working copy)
@@ -39,6 +39,11 @@
 ONE_REPOSITORY = 1
 include ../makefile.common
+# generate import library on Cygwin
+#ifneq ($(findstring CYGWIN,$(OSNAME)),)
+  LDSOFLAGS += -Wl,--out-implib,lib$(LIBBASE).a
+#endif
+
 CXXFLAGS    += $(PICFLAGS)
 LDFLAGS     += $(LDSOFLAGS) $(MAPFLAGS) $(MAPFILE)
Farid.

Reply via email to