Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22009

How to cross compile C to i386 on windows?

$
0
0

I am following a tutorial to create an operating system in C (and a little assembly), and since most of this stuff is done on linux I am having a hard time getting the various tools to work on windows. So far I am just trying to compile the code from the tutorial, and I haven't made any changes yet. This is the kernel (which gets loaded by an asm bootsector):

void dummy_test_entrypoint() {}void main() {    char* video_memory = (char*) 0xb8000;    *video_memory = 'X';}

I am instructed to compile this using a gcc cross-compiler. And when I try to use the i386-elf-gcc windows binaries: link using the command:

i386-elf-gcc -ffreestanding -c kernel.c -o kernel.o

it gives me the error:

i386-elf-gcc: error: spawn: No such file or directory

This issue seems to be known, though I have no idea what that means. Any help would be appreciated.


Viewing all articles
Browse latest Browse all 22009

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>