On 1/1/2016 6:08 AM, Eli Zaretskii wrote:
> The next problem was with linking TestXS as a shared library.  Because
> no undefined references are allowed when linking a shared library on
> MS-Windows, the linker needs to see an import library which tells it
> where to find the Perl functions at run time.

There is a similar linking problem on Cygwin, but the following patch fixes it:

Index: tp/Texinfo/Convert/XSParagraph/Makefile.am
===================================================================
--- tp/Texinfo/Convert/XSParagraph/Makefile.am  (revision 6910)
+++ tp/Texinfo/Convert/XSParagraph/Makefile.am  (working copy)
@@ -74,7 +74,7 @@
 
 XSParagraph_la_CFLAGS += -DVERSION=\"$(VERSION)\" 
-DXS_VERSION=\"$(XSPARAGRAPH_INTERFACE_VERSION)\"  "-I$(PERL_INC)"
 
-XSParagraph_la_LDFLAGS=-no-undefined -avoid-version -module 
$(PERL_CONF_cccdlflags)
+XSParagraph_la_LDFLAGS=-no-undefined -avoid-version -module 
$(PERL_CONF_cccdlflags) -L$(PERL_INC) -lperl
 # The -no-undefined flag is for MS-Windows.  See info node
 # `(gnulib)Libtool and Windows'.
 
@@ -83,7 +83,7 @@
 
 TestXS_la_CFLAGS += -DVERSION=\"$(VERSION)\" -DXS_VERSION=\"$(VERSION)\"  
"-I$(PERL_INC)"
 
-TestXS_la_LDFLAGS=-no-undefined -module $(PERL_CONF_cccdlflags)
+TestXS_la_LDFLAGS=-no-undefined -module $(PERL_CONF_cccdlflags) -L$(PERL_INC) 
-lperl
 
 # only used to regenerate a stand-alone perl module
 perl_specific_files = \


I imagine this would be harmless on other platforms too.  I don't know if it 
would help in the MinGW build.

Ken

Reply via email to