windows build fixes

This commit is contained in:
ari melody 2024-06-24 17:37:12 +01:00
parent 22e60ee228
commit d2fe432828
Signed by: ari
GPG key ID: CF99829C92678188
3 changed files with 5 additions and 1 deletions

3
build.ps1 Normal file
View file

@ -0,0 +1,3 @@
New-Item -ItemType Directory -Force -Path ./bin/
gcc -Wall -o ./bin/compile ./src/*.c ./src/parsers/*.c

View file

@ -72,7 +72,7 @@ int main(int argc, char **argv) {
} }
// get length of file // get length of file
fseek(input_file, -sizeof(char), SEEK_END); fseek(input_file, (long)-sizeof(char), SEEK_END);
size_t length = ftell(input_file); size_t length = ftell(input_file);
fseek(input_file, 0, SEEK_SET); fseek(input_file, 0, SEEK_SET);

View file

@ -1,6 +1,7 @@
#include "json.h" #include "json.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>