jeuxdemains / vector-os

A simple 32 bit OS with small Kernel coded from scratch in Assembler (NASM) and C.
13 stars 1 forks source link

Unable to link elf_i386? #5

Open Retro-Jon opened 1 year ago

Retro-Jon commented 1 year ago

When I tried to build the project, I got the following linker error

ld: cannot open linker script file ldscripts/elf_i386.xc: No such file or directory

I have this file installed in my MinGW installation's ldscripts directory and even set a path variable to find ldscripts. I'm using mingw-w64 and it seems that the included linker might be broken.

What version of MinGW did you use for this project?

jeuxdemains commented 1 year ago

Try on Linux or WSL. On native windows MinGW will try to create PE (portable executable) instead of ELF (executable and linkable format).

You will need QEMU to run the compiled binaries.

You can install QEMU from the MSYS32/MinGW terminal: pacman -S mingw-w64-x86_64-qemu While installing QEMU on windows via MSYS32 I hit a package signature issue so I can't provide you with any further steps at this point.

On Linux it should compile and run without any issues.