swig/Examples/c/simple/runme.c
Vadim Zeitlin 03b6e2fbe6 Don't use SWIG_exit() in C examples
There doesn't seem to be any reason for using it rather than just
returning from main() as usual, and it provokes warnings about
implicitly declared function when compiling them.
2021-10-05 00:26:12 +02:00

15 lines
274 B
C

#include <stdio.h>
#include "example_wrap.h"
int main(int argc, char **argv) {
int a = 42;
int b = 105;
int g = gcd(a, b);
printf("The gcd of %d and %d is %d\n", a, b, g);
printf("Foo = %f\n", Foo);
Foo = 3.1415926;
printf("Foo = %f\n", Foo);
return 0;
}