Skip to content

Commit 6f76dfc

Browse files
committed
Forward declare tinyxml type used in library.h to avoid problems with dynamic linked configuration.
1 parent 93b8a26 commit 6f76dfc

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/library.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@
2525
#include "path.h"
2626
#include "mathlib.h"
2727

28-
#include <tinyxml2.h>
2928
#include <map>
3029
#include <set>
3130
#include <string>
3231
#include <list>
3332
#include <algorithm>
3433

3534
class TokenList;
35+
namespace tinyxml2 {
36+
class XMLDocument;
37+
}
3638

3739
/// @addtogroup Core
3840
/// @{

test/testlibrary.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "token.h"
2121
#include "tokenlist.h"
2222
#include "testsuite.h"
23+
#include <tinyxml2.h>
2324

2425
class TestLibrary : public TestFixture {
2526
public:

test/testother.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818

1919
#include "preprocessor.h"
2020
#include "tokenize.h"
21+
#include "symboldatabase.h"
2122
#include "checkother.h"
2223
#include "testsuite.h"
2324
#include <sstream>
24-
#include <symboldatabase.h>
25+
#include <tinyxml2.h>
2526

2627
extern std::ostringstream errout;
2728

0 commit comments

Comments
 (0)