ktye / i

interpret
101 stars 16 forks source link

Trying to mk in i/+ #53

Open carkat opened 1 month ago

carkat commented 1 month ago
sudo sh mk
+ [  = ktye.h ]
+ DEF=
+ cc=gcc -O2 -s -Werror -Wfatal-errors
+ DEF= -DMAT
+ MAT=mat.o liblapacke.a liblapack.a librefblas.a -lgfortran -lquadmath -lm
+ gcc -O2 -s -Werror -Wfatal-errors -c mat/mat.c
+ DEF= -DMAT -DDRW
+ DRW=draw.o cairo.dll
+ gcc -O2 -s -Werror -Wfatal-errors -I/usr/include/cairo/ -c draw/draw.c
+ DEF= -DMAT -DDRW -DRAY
+ RAY=ray.o libraylib.a -lopengl32 -lgdi32 -lwinmm
+ gcc -O2 -s -Werror -Wfatal-errors -c ray/ray.c
+ wg -c -prefix ktye_ -nomain ..
mk: 45: mk: wg: not found

I have both ktye/wg and ktye/i projects in the same directory. I've also had to change the include path for cairo installation. I've also manually copied over the raylib.h and rgesture.h files from raylib on github into i/+/ray/

Not sure what to do about this wg not found. Just thought it had to be in i/../wg

ktye commented 1 month ago

thank's for trying. you have to install the wg binary first: go install github.com/ktye/wg/cmd/wg. it's a program that translates go to c and writes ktye.h. i haven't compiled k+ for a while, so it was also broken. please update ktye/i and ktye/wg first. also note that mk is for windows and mk.lin for linux.

carkat commented 1 month ago

I got wg working, thanks for the help. Pulled latest on ktye/i

Now running sh mk.lin

$cc -c -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION sqlite3.c
$cc -c sqlite/sqlite.c

Running into an issue with these lines. I tried adding sqlite/ to the front of the sqlite3.c in the first line, but it still says no such file or directory.

+ gcc -O2 -s -Werror -Wfatal-errors -c -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION sqlite3.c
gcc: error: sqlite3.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.

So I removed the sqlite stuff, and tried to run sh mk.lin ktye.h

Which yields

+ gcc -O2 -s -Werror -Wfatal-errors -c -DMAT -DDRW -DRAY k.c
k.c: In function ‘main’:
k.c:35:2: error: ‘args_’ undeclared (first use in this function); did you mean ‘args’?
  args_=(int32_t)args;
  ^~~~~
  args
compilation terminated due to -Wfatal-errors.
carkat commented 1 month ago

A fresh clone of ktye/i still requires that I copy over ray/raylib.h and ray/rgestures.h

And there doesn't seem to be a ktye.h

ktye commented 1 month ago

yes you have to copy the dependencies manually. they are not checked in. ktye.h is generated by mk or if you use mk.lin use sh mk ktye.h to create it.