diff options
Diffstat (limited to 'demo/embedding_test.c')
-rw-r--r-- | demo/embedding_test.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/demo/embedding_test.c b/demo/embedding_test.c new file mode 100644 index 0000000..87d313b --- /dev/null +++ b/demo/embedding_test.c @@ -0,0 +1,19 @@ +/* Link this program with libembedding_test.so. + E.g. with gcc: + + gcc -o embedding_test embedding_test.c _embedding_cffi*.so +*/ + +#include <stdio.h> + +extern int add(int x, int y); + + +int main(void) +{ + int res = add(40, 2); + printf("result: %d\n", res); + res = add(100, -5); + printf("result: %d\n", res); + return 0; +} |