On MSVC, I see this link error:

/home/bruno/msvc/compile cl -nologo  -MD  -L/usr/local/msvc32/lib -o 
test-getusershell.exe test-getusershell.obj libtests.a ../gllib/libgnu.a 
libtests.a ../gllib/libgnu.a libtests.a  
cl : Command line warning D9024 : unrecognized source file type 'libtests.a', 
object file assumed
cl : Command line warning D9024 : unrecognized source file type 
'../gllib/libgnu.a', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'libtests.a', 
object file assumed
cl : Command line warning D9024 : unrecognized source file type 
'../gllib/libgnu.a', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'libtests.a', 
object file assumed
libgnu.a(xalloc-die.obj) : error LNK2019: unresolved external symbol 
_libintl_gettext referenced in function _xalloc_die
libgnu.a(error.obj) : error LNK2001: unresolved external symbol _libintl_gettext
test-getusershell.exe : fatal error LNK1120: 1 unresolved externals
make[4]: *** [Makefile:19817: test-getusershell.exe] Error 2

This patch fixes it.


2024-05-17  Bruno Haible  <br...@clisp.org>

        getusershell tests: Fix link error on MSVC.
        * modules/getusershell-tests (Makefile.am): Link test-getusershell with
        $(LIBINTL).

diff --git a/modules/getusershell-tests b/modules/getusershell-tests
index 2491caaab5..23c4501c1c 100644
--- a/modules/getusershell-tests
+++ b/modules/getusershell-tests
@@ -11,3 +11,4 @@ configure.ac:
 Makefile.am:
 TESTS += test-getusershell
 check_PROGRAMS += test-getusershell
+test_getusershell_LDADD = $(LDADD) $(LIBINTL)




Reply via email to