I'm currently trying to make a basic compiler on Windows using C++. And I was thinking about how to turn assembly into machine code or an exe file. If this were to be downloaded by another computer I think it wouldn't work without having to attach an assembler and linker with it, like nasm and ld. Is there any way at all to make this work without sending an assembler and linker?
Every compiler package I have ever used always includes an assembler and linker.
Most modern compilers don't use the assembler directly. The same program converts C or another high level language directly into object code.
They do generally do the linking stage separately. This can be with a different program, but the two programs are installed together as a package and most users don't concern themselves with which task is carried out by which part.