Abdelrazak Younes wrote:
Timothy Reaves wrote:
/sw/lib/odcctools/bin/ld: multiple definitions of symbol (anonymous
namespace)::ucs4_codeset
support/.libs/libsupport.a(unicode.o) definition of (anonymous
namespace)::ucs4_codeset in section (__DATA,__data)
support/.libs/libsupport.a(docstream.o) definition of (anonymous
namespace)::ucs4_codeset in section (__DATA,__data)
This is again the non invisible anonymous namespace bitting you. What
version of gcc do you have? Or maybe it is a linker issue?
Anyway, this simple patch will solve it. Any objection Georg? Or would
you prefer to reuse the ones defined in unicode.C?
like this patch?
Index: docstream.C
===================================================================
--- docstream.C (revision 15352)
+++ docstream.C (working copy)
@@ -11,6 +11,7 @@
#include <config.h>
#include "docstream.h"
+#include "unicode.h"
#include <cerrno>
#include <cstdio>
@@ -19,11 +20,6 @@
namespace {
-#ifdef WORDS_BIGENDIAN
-char const * ucs4_codeset = "UCS-4BE";
-#else
-char const * ucs4_codeset = "UCS-4LE";
-#endif
char const * utf8_codeset = "UTF-8";
// We use C IO throughout this file, because the facets might be used with
Index: unicode.h
===================================================================
--- unicode.h (revision 15352)
+++ unicode.h (working copy)
@@ -61,4 +61,7 @@
std::vector<char>
ucs4_to_utf8(lyx::char_type const * ucs4str, size_t ls);
+extern char const * ucs4_codeset;
+extern char const * ucs2_codeset;
+
#endif