i386:x86-64 architecture of input file `kernel.o' is incompatible with i386 output It gives the error, what is the solution, I will post the screenshot and the c++ code.
You are trying to link a 64-bit object file into a 32-bit executable. Not possible.
Presumably you compiled your source with a 64-bit compiler. You either need to tell it to produce 32-bit code or (much better) use a 32-bit cross compiler.
You are trying to link a 64-bit object file into a 32-bit executable. Not possible.
Presumably you compiled your source with a 64-bit compiler. You either need to tell it to produce 32-bit code or (much better) use a 32-bit cross compiler.
I feel like this is becoming a trend -- people think that you can just use a hosted compiler to build an OS. I'm kinda curious why people repeatedly assume this, particularly since it causes so, so many problems and is so painful.