From 000f57e11cf3272951cd3463f5d8bb82bc8e3903 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 6 Nov 2022 22:11:41 -0500 Subject: read symbol type --- tests/dylib-test.c | 12 ++++++++++++ tests/dylib.c | 4 ++++ tests/dylib.h | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 tests/dylib-test.c create mode 100644 tests/dylib.c create mode 100644 tests/dylib.h (limited to 'tests') diff --git a/tests/dylib-test.c b/tests/dylib-test.c new file mode 100644 index 0000000..ae824b0 --- /dev/null +++ b/tests/dylib-test.c @@ -0,0 +1,12 @@ +#include "dylib.h" +#include +#include + +void entry(void) { + the_number = 7; + printf("%d\n",the_number); + bigger(); + printf("%d\n",the_number); + + exit(0); +} diff --git a/tests/dylib.c b/tests/dylib.c new file mode 100644 index 0000000..8da43a8 --- /dev/null +++ b/tests/dylib.c @@ -0,0 +1,4 @@ +#include "dylib.h" + +int the_number; +void bigger() { the_number += 1; } diff --git a/tests/dylib.h b/tests/dylib.h new file mode 100644 index 0000000..3b5d369 --- /dev/null +++ b/tests/dylib.h @@ -0,0 +1,8 @@ +// here is a realyl great dynami library i made it myself +#ifndef DYLIB_H_IS_REALLY_INCLUDED____ +#define DYLIB_H_IS_REALLY_INCLUDED____ +// ---------------dylib HEADER FILE --------- +// /PLEASE INCLUDE IF YOU WANT TO USE dylib +extern int the_number; // the number what it is +void bigger(void); // make the number bigger by 1 +#endif // DYLIB_H_IS_REALLY_INCLUDED____ -- cgit v1.2.3