[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
category-none: Fix link errors on MSVC, when libunistring is installed
From: |
Bruno Haible |
Subject: |
category-none: Fix link errors on MSVC, when libunistring is installed |
Date: |
Sun, 23 Apr 2023 20:20:14 +0200 |
On a MSVC system, with libunistring 1.0 installed, a Gnulib testdir has
link errors:
libgnu.a(categ_and_not.obj) : error LNK2019: unresolved external symbol
__UC_CATEGORY_NONE referenced in function _uc_general_category_and_not
libgnu.a(categ_and.obj) : error LNK2019: unresolved external symbol
__UC_CATEGORY_NONE referenced in function _uc_general_category_and
libgnu.a(categ_byname.obj) : error LNK2019: unresolved external symbol
__UC_CATEGORY_NONE referenced in function _uc_general_category_byname
libgnu.a(categ_of.obj) : error LNK2019: unresolved external symbol
__UC_CATEGORY_NONE referenced in function _uc_general_category
The cause is that the gl_LIBUNISTRING_MODULE has determined that since
libunistring >= 0.9.8 is present, the file lib/unictype/categ_none.c does
not need to be compiled. But the symbol _UC_CATEGORY_NONE is not exported
from libunistring. (This is intentional, since it's not a public API.)
This patch fixes the link errors.
2023-04-23 Bruno Haible <bruno@clisp.org>
category-none: Fix link errors on MSVC, when libunistring is installed.
* modules/unictype/category-none (configure.ac): Remove
gl_LIBUNISTRING_MODULE invocation.
(Makefile.am): Compile unictype/categ_none.c always.
diff --git a/modules/unictype/category-none b/modules/unictype/category-none
index c07d55a96f..7b8aa83da6 100644
--- a/modules/unictype/category-none
+++ b/modules/unictype/category-none
@@ -8,12 +8,11 @@ Depends-on:
unictype/base
configure.ac:
-gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-none])
+dnl Since _UC_CATEGORY_NONE is not exported from an installed libunistring,
+dnl don't use gl_LIBUNISTRING_MODULE here.
Makefile.am:
-if LIBUNISTRING_COMPILE_UNICTYPE_CATEGORY_NONE
lib_SOURCES += unictype/categ_none.c
-endif
Include:
"unictype.h"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- category-none: Fix link errors on MSVC, when libunistring is installed,
Bruno Haible <=