main
bel 2023-11-17 19:47:34 -07:00
parent dc041e41fd
commit 3796623147
4 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#include "helloworld.h" #include "helloworld.h"
void main() { int foo() {
printf("hello world\n"); return 0;
} }

3
c.d/helloworld.def Normal file
View File

@ -0,0 +1,3 @@
headers = helloworld.h
headerFilter = helloworld.h
package = helloworld

View File

@ -1 +1,3 @@
#include <stdio.h> #include <stdio.h>
int foo();

View File

@ -4,5 +4,10 @@ set -e
set -o pipefail set -o pipefail
set -u set -u
gcc ./*.{h,c} echo GCC
./a.out echo gcc ./*.{h,c}
echo CINTEROP
cinterop -def helloworld.def -compiler-option -I. -o helloworld
echo LS
ls ./helloworld.klib ./helloworld-build/kotlin