File tree Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Expand file tree Collapse file tree 4 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ if(EXISTS "${ED_TEST_DIR}")
46
46
foreach (TEST ${ED_TESTS} )
47
47
add_executable (${TEST}
48
48
"${ED_TEST_DIR} /${TEST} .cc"
49
+ "${ED_TEST_DIR} /Test_Linkage.cc"
50
+ "${ED_TEST_DIR} /Test_Linkage.c"
49
51
"${ED_TEST_DIR} /Constants.h"
50
52
)
51
53
target_compile_features (${TEST} PRIVATE cxx_std_17 )
@@ -73,6 +75,8 @@ if(EXISTS "${ED_TEST_DIR}")
73
75
)
74
76
if (UNIX )
75
77
list (APPEND ED_ALL_LIBS m )
78
+ elseif (MSVC )
79
+ target_link_options (${TEST} PRIVATE "/FORCE:MULTIPLE" )
76
80
endif ()
77
81
target_link_libraries (${TEST} PRIVATE ${ED_ALL_LIBS} )
78
82
Original file line number Diff line number Diff line change 23
23
extern "C" {
24
24
#endif
25
25
26
- extern long timezone = 0 ;
26
+ __declspec( selectany ) extern long timezone = 0 ;
27
27
28
28
#if defined(G_HAS_CONSTRUCTORS )
29
29
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
30
30
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(Timezone_initialize)
31
31
#endif
32
32
G_DEFINE_CONSTRUCTOR (Timezone_initialize )
33
- static void Timezone_initialize (void ) {
33
+ static inline void Timezone_initialize (void ) {
34
34
_get_timezone (& timezone );
35
35
}
36
36
#endif
Original file line number Diff line number Diff line change
1
+ /* Test_Linkage.c
2
+ *
3
+ * Copyright (C) 2015-2025, Thomas Beutlich
4
+ * All rights reserved.
5
+ *
6
+ * SPDX-License-Identifier: BSD-2-Clause
7
+ */
8
+
9
+ #include "../Include/msvc_compatibility.h"
Original file line number Diff line number Diff line change
1
+ /* Test_Linkage.cc
2
+ *
3
+ * Copyright (C) 2015-2025, Thomas Beutlich
4
+ * All rights reserved.
5
+ *
6
+ * SPDX-License-Identifier: BSD-2-Clause
7
+ */
8
+
9
+ #include " ../Include/msvc_compatibility.h"
10
+ #include " Constants.h"
You can’t perform that action at this time.
0 commit comments