flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Help with compiling a C OS...

Author
Thread Post new topic Reply to topic
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009
Hello! I want to make an operating system in C. I have a bootloader made in FASM, but I can't download GCC or DJGPP becuase they get canceled in the middle of the downloads.

I tried using LCC but it spit out tons of errors (and i was just compiling an unedited example.)


So, I was wondering if it would be possible to use something like DevC++ to compile it. I'm not sure if it has a linker though.

Could someone please help?

EDIT: Okay, i fnally got DJGPP to download. Razz
Post 13 Jun 2005, 17:04
View user's profile Send private message Reply with quote
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009
Really sorry about the double post, but I am having problems with the LD linker program...

when i try to link two files called ks.o and kernel.o together, i get an error about the file format ".o" not being recognized.

Has anyone else had thos problem, and how can I fix it?
Post 13 Jun 2005, 18:40
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
Just in case you have not noticed... this is an ASM forum. Many here are C/C++ programmers for a living; but there are forums for this also.

As a word of advice get to know your tools. If you like C i guess you should already have a favourite toolchain. If not learn one Wink

Starting an OS is not for newbies... although it looks like the most popular occupation lately Wink It might be a good thing for learning low level stuff but you should be very good in one general programming language first.

Anyway if you have the sources for a certain OS in C (not written by you as I presume) please do respect the tool chain suggested by the author.

And I do suggest that you go on and download gcc, VC, plus whatever C/C++ tools or IDE's you might need.

The error is probaly because you are not using the right makefiles, shell scripts, .BAT or command line options for your linker/compiler and project.
Post 13 Jun 2005, 23:41
View user's profile Send private message Visit poster's website Reply with quote
DataHunter2009



Joined: 10 Jun 2005
Posts: 144
DataHunter2009
Sorry about posting this here. But it turns out that it won't work by using the ELF format... it has to use COFF. Anyway, that's fixed now. Smile
Post 14 Jun 2005, 00:04
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.