blob: 308e51c9b4d5b332adb6062315937139ce4f8e1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
From 71841b7aa7c5e75a793cfaafb31865524a74d9fc Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 4 Jun 2015 16:13:18 +0200
Subject: [PATCH] workaround a linking problem on windows
Linking scfiltlo.dll gives the following error:
xmlcontext.o : error LNK2019: unresolved external symbol "char const * const orcus::XMLNS_UNKNOWN_ID" (?XMLNS_UNKNOWN_ID@orcus@@3QBDB) referenced in function "void __cdecl std::_For_each<unsigned int const *,class `anonymous namespace'::SetNamespaceAlias>(unsigned int const *,unsigned int const *,class `anonymous namespace'::SetNamespaceAlias &)" (??$_For_each@PBIVSetNamespaceAlias@?A0xafb5dd33@@@std@@YAXPBI0AAVSetNamespaceAlias@?A0xafb5dd33@@@Z)
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Windows/instdir/program/scfiltlo.dll : fatal error LNK1120: 1 unresolved externals
I have got no idea what is the cause of this: the constant--exported in
liborcus-parser.dll--is used in liborus.dll without any problem.
---
include/orcus/types.hpp | 2 +-
src/parser/types.cpp | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/orcus/types.hpp b/include/orcus/types.hpp
index b6e3f83..8027f25 100644
--- a/include/orcus/types.hpp
+++ b/include/orcus/types.hpp
@@ -21,7 +21,7 @@ namespace orcus {
typedef size_t xml_token_t;
typedef const char* xmlns_id_t;
-ORCUS_PSR_DLLPUBLIC extern const xmlns_id_t XMLNS_UNKNOWN_ID;
+const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
ORCUS_PSR_DLLPUBLIC extern const xml_token_t XML_UNKNOWN_TOKEN;
ORCUS_PSR_DLLPUBLIC extern const size_t index_not_found;
ORCUS_PSR_DLLPUBLIC extern const size_t unspecified;
diff --git a/src/parser/types.cpp b/src/parser/types.cpp
index be4e304..0a1b4a7 100644
--- a/src/parser/types.cpp
+++ b/src/parser/types.cpp
@@ -12,7 +12,6 @@
namespace orcus {
-const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr;
const xml_token_t XML_UNKNOWN_TOKEN = 0;
const size_t index_not_found = std::numeric_limits<size_t>::max();
--
2.4.1
|