Skip to content

Instantly share code, notes, and snippets.

@telliott99
Last active December 10, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save telliott99/858b1a062ed5f2c518bc to your computer and use it in GitHub Desktop.
Save telliott99/858b1a062ed5f2c518bc to your computer and use it in GitHub Desktop.
Swift import C framework
int f1(int);
int f2(int);
#include <stdio.h>
int f1(int x) {
printf( "f1: %d;", x );
return x+1;
}
#include <stdio.h>
int f2(int x) {
printf( "f2: %d;", x );
return x+2;
}
#include <stdio.h>
#include "add.h"
int main(int argc, char** argv){
printf(" main %d\n", f1(1));
printf(" main %d\n", f2(10));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment