I\'m following the kernel tutorial from here
im having problems compiling my files.
i get the following errors when i try to compile:
main.c:
Replace size_t by int in each method definition on main.c
Probably your issue is that size_t isn't the same as int on your platform, or size_t isn't specified correctly at all. The pointer types should be OK (technically, they should match too, but on most systems sizeof(char*) == sizeof(void*)).
If you're developing your own kernel, you'd want to write your own system.h. If you're writing both system.h and main.c, you can make them match up however you'd like. If you look at this page of the tutorial, you'd see that header and C source both declare memcpy as:
unsigned char *memcpy(unsigned char *dest, const unsigned char *src, int count);
But if you download the example source files at the end of the tutorial, you find it is instead:
void *memcpy(void *dest, const void *src, size_t count);
Looking at the top of that file, you find the following comment:
/* bkerndev - Bran's Kernel Development Tutorial
* By: Brandon F. (friesenb@gmail.com)
* Desc: Main.c: C code entry.
*
* Notes: No warranty expressed or implied. Use at own risk. */
It doesn't look like you're trying to follow a tutorial, but rather that you're trying to cut and paste code from a tutorial. That's like trying to learn to perform brain surgery by following along in a book. You might get it to work, but if you don't really understand what you're doing... well, please do the world a favor and don't use it for anything critical.