Hi there! I’m trying to build Kotlin/Multiplatform library, and I’m somewhat stuck with its Kotlin/Native implementation because of this error:
Exception in thread "main" java.lang.Error: IdeaProjects\multifile\multifile-in-c\src\main\public\multifile.h:15:29: error: unknown type name 'FILE'
Here is my multifile.h:
#ifndef MULTIFILE_IN_C_MULTIFILE_H
#define MULTIFILE_IN_C_MULTIFILE_H
#include <stdio.h>
#include <stdbool.h>
typedef struct {
long size;
unsigned char* bytesPointer;
bool eof;
} bytesArray;
extern long getFileSize(const char *filename);
extern bytesArray readBytes(FILE *fp, long startFrom, long howMuch);
extern long getFileSizeByPointer(FILE *fp);
extern void freeBytesArray(bytesArray* array);
#endif //MULTIFILE_IN_C_MULTIFILE_H
I’m novice in Kotlin/Native, but I see that C programming language is much easier than set up this. I’ll appreciate any help you give me here