diff options
author | Florian Pritz <bluewind@xinu.at> | 2011-07-21 16:12:21 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2011-07-21 16:12:21 +0200 |
commit | e50f2a53d718bc3a55162745ffb20464f16601b2 (patch) | |
tree | 6518067f5aa458b26542cda6175ea874e90d6f99 /libtest.c | |
parent | 27f0010fd7d32789ae2f2802d777e0f80547908e (diff) | |
download | bin-e50f2a53d718bc3a55162745ffb20464f16601b2.tar.gz bin-e50f2a53d718bc3a55162745ffb20464f16601b2.tar.xz |
add libtest.c
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'libtest.c')
-rw-r--r-- | libtest.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libtest.c b/libtest.c new file mode 100644 index 0000000..1d00b80 --- /dev/null +++ b/libtest.c @@ -0,0 +1,18 @@ +// compile with gcc -ldl -o libtest libtest.c + +#include <dlfcn.h> +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char const* argv[]) +{ + void *handle; + + handle = dlopen(argv[1], RTLD_NOW); + if(!handle) { + fprintf(stderr, "%s\n", dlerror()); + return 1; + } + dlclose(handle); + return 0; +} |