Hi,
While building Ezra Project packages for Ubuntu 19.04 including a
statically linked version of Sword I ran into compile time problems. The
problems were related to the ICU library.
I'm using libicu-dev (ICU 63): https://packages.ubuntu.com/disco/libicu-dev
The errors are all the same and caused by UnicodeString type that cannot
be identified as a type.
Example:
In file included from
/tmp/node-sword-interface-git/sword/src/mgr/swmgr.cpp:108:
/tmp/node-sword-interface-git/sword/include/utf8transliterator.h:53:2:
error: 'UnicodeString' does not name a type
UnicodeString resource;
The issue can be fixed by prepending a "icu::" namespace identifier in
front of the UnicodeString (like icu::UnicodeString) or by just adding
statement in the beginning "using namespace icu;".
I've been patching my Sword checkout using the "using namespace icu;"
fix in the corresponding files, see attached patch.
This does not cause problems with an earlier ICU version (like 60.2 on
Ubuntu 18.04 LTS), so it may just be included in the Sword sources?
Best regards,
Tobias
Index: include/utf8transliterator.h
===================================================================
--- include/utf8transliterator.h (revision 3662)
+++ include/utf8transliterator.h (working copy)
@@ -45,6 +45,8 @@
#include <defs.h>
#include <map>
+using namespace icu;
+
SWORD_NAMESPACE_START
class SWModule;
Index: src/modules/filters/scsuutf8.cpp
===================================================================
--- src/modules/filters/scsuutf8.cpp (revision 3662)
+++ src/modules/filters/scsuutf8.cpp (working copy)
@@ -35,8 +35,8 @@
#include <unicode/unistr.h>
#endif
+using namespace icu;
-
SWORD_NAMESPACE_START
Index: src/modules/filters/utf8nfc.cpp
===================================================================
--- src/modules/filters/utf8nfc.cpp (revision 3662)
+++ src/modules/filters/utf8nfc.cpp (working copy)
@@ -30,6 +30,8 @@
#include <utf8nfc.h>
#include <swbuf.h>
+using namespace icu;
+
SWORD_NAMESPACE_START
UTF8NFC::UTF8NFC() {
Index: src/modules/filters/utf8scsu.cpp
===================================================================
--- src/modules/filters/utf8scsu.cpp (revision 3662)
+++ src/modules/filters/utf8scsu.cpp (working copy)
@@ -25,6 +25,8 @@
#include <utf8scsu.h>
#include <swbuf.h>
+using namespace icu;
+
SWORD_NAMESPACE_START
_______________________________________________
sword-devel mailing list: [email protected]
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page