X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fld-output-def.texi;h=526ccb042bf629ca5b24c365874e33a2dbbbe063;hb=e84a5dced96edbd298e154cf7db2d876f49f5c5a;hp=3ad1feb547e4fdde1a7875cd7753764f4d0d951f;hpb=68f982e01be79f241a306e1dd7328fa1f307ab0c;p=gnulib.git diff --git a/doc/ld-output-def.texi b/doc/ld-output-def.texi index 3ad1feb54..526ccb042 100644 --- a/doc/ld-output-def.texi +++ b/doc/ld-output-def.texi @@ -15,11 +15,15 @@ The variants we have considered include: @itemize @bullet @item Use DUMPBIN /EXPORTS. +This is explained in @url{http://support.microsoft.com/kb/131313/en-us}. The tool does not generate DEF files directly, so its output needs to -be post processed manually. The tool is documented to potentially not -work with non-MS development tools -(@url{http://support.microsoft.com/kb/131313/en-us}), which is the -case when MinGW is used to build the library. +be post processed manually: +@smallexample +$ @{ echo EXPORTS; \ + dumpbin /EXPORTS libfoo-0.dll | tail -n+20 | awk '@{ print $4 @}'; \ + @} > libfoo-0.def +$ lib /def:libfoo-0.def +@end smallexample @item Use IMPDEF. There is a tool called IMPDEF @@ -44,21 +48,21 @@ library: @smallexample if HAVE_LD_OUTPUT_DEF -libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(SOVERSION).def +libfoo_la_LDFLAGS += -Wl,--output-def,libfoo-$(DLL_VERSION).def defexecdir = $(bindir) -defexec_DATA = libfoo-$(SOVERSION).def +defexec_DATA = libfoo-$(DLL_VERSION).def DISTCLEANFILES += $(defexec_DATA) endif @end smallexample -The @code{SOVERSION} variable needs to be defined. It should be the +The @code{DLL_VERSION} variable needs to be defined. It should be the shared library version number used in the DLL filename. For Windows targets you compute this value from the values you pass to Libtool's @code{-version-info}. Assuming you have variables @code{LT_CURRENT} and @code{LT_AGE} defined for the @code{CURRENT} and @code{AGE} -libtool version integers, you compute @code{SOVERSION} as follows: +libtool version integers, you compute @code{DLL_VERSION} as follows: @smallexample -SOVERSION=`expr $@{LT_CURRENT@} - $@{LT_AGE@}` -AC_SUBST(SOVERSION) +DLL_VERSION=`expr $@{LT_CURRENT@} - $@{LT_AGE@}` +AC_SUBST(DLL_VERSION) @end smallexample