summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ObjectLibrary/b.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ObjectLibrary/b.c')
-rw-r--r--Tests/RunCMake/ObjectLibrary/b.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Tests/RunCMake/ObjectLibrary/b.c b/Tests/RunCMake/ObjectLibrary/b.c
index 6751907..7549abf 100644
--- a/Tests/RunCMake/ObjectLibrary/b.c
+++ b/Tests/RunCMake/ObjectLibrary/b.c
@@ -1,4 +1,14 @@
-int b(void)
+#if defined(_WIN32) && defined(COMPILE_FOR_SHARED_LIB)
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+
+extern int a(void);
+EXPORT int b()
{
- return 0;
+ return a();
}
+#ifndef REQUIRED
+#error "REQUIRED needs to be defined"
+#endif