Page 1 of 2
Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 1:55 am
by codemastersnake
Hi all!
Well since I have started with the third version of Magneto, I was thinking whether it is feaseble to use libstdc++ or any other library for development of my OS.
To make it more clear, My question is that, As we define our own functions for doing anything right from printing onscreen or fetching key strokes from a keyboard, can we integrate libstdc++ and use it's defined function for development?
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 2:07 am
by Love4Boobies
It depends on how you implement your function. If not, you can port it to your OS. Check out the wiki to get an idea
http://wiki.osdev.org/Porting_Newlib .
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 9:05 am
by codemastersnake
It's worth to read that article, But I wanted to know is there any library that is specially meant for developing an OS... I know I may sound stupid... but there's gotta be something...
To be specific: I want a library for my OS's Kernel Implementation. I don't want a cake walk, but if libstdc++ can be used then I could make my OS much generalised...
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 9:27 am
by piranha
Heres a library for kernels. I haven't used it, and I have no idea how to implement it, but I'm sure that infos on the site.
El Linko
-JL
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 3:11 pm
by codemastersnake
Did looked at it... and it's do very well written.. but do't know about it's stability and it's not standard complaint....
Does any body know the answer of my question... please do tell
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 4:59 pm
by pcmattman
You can port Newlib to work in your kernel - ie, link the library to your kernel. Then you simply port libstdc++ (which needs a libc, hence the Newlib port) and can use it in your kernel.
It also doesn't matter if your methods are a bit non-standard, as Newlib takes a set of glue functions that provide the functionality internally. All you'd need to do is link up the glue function with code to do it the way you want.
Re: Can I use GNU libstdc++ for OS Development?
Posted: Sun Sep 28, 2008 5:32 pm
by bewing
It sounds to me like you are asking about an OSKit. There are various ones around, but they all have little problems, and their licenses are generally not good.
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 3:20 am
by codemastersnake
bewing wrote:It sounds to me like you are asking about an OSKit. There are various ones around, but they all have little problems, and their licenses are generally not good.
exactly...
Though newlib idea seems good, But it's latest version was released in 2007... Thats why I was asking about stdlibc and stdlibc++...
Any other views?
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 3:37 am
by AJ
Hi,
I know you have been given the link to Porting Newlib, but have you seen the
OS Specific Toolchain article? That goes through a number of steps including porting libstdc++ (and libsupc++).
Cheers,
Adam
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 3:38 am
by Combuster
But it's latest version was released in 2007
Like, its not infested with bugs that warrants a montly release cycle
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 4:39 am
by codemastersnake
AJ wrote:Hi,
I know you have been given the link to Porting Newlib, but have you seen the
OS Specific Toolchain article? That goes through a number of steps including porting libstdc++ (and libsupc++).
Cheers,
Adam
A very informative article. May be I am wrong but it teaches how to port libc or libc++ to your os along with gcc so that I would be able to develop c/c++ programs on my OS...
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 4:49 am
by AJ
Hi,
That's correct - once you have a text editor, your os would be completely self-hosted.
Cheers,
Adam
Re: Can I use GNU libstdc++ for OS Development?
Posted: Mon Sep 29, 2008 7:35 pm
by kubeos
I wouldn't recommend using Oslib or any other kernel library unless you intend to go with a GPL license. I went down that road and when my filesystem was done, I decided I didn't want the GPL. So I've spent a lot of time getting rid of OSLib and replacing it with my own routines.
Another problem I found early on with OSLib itself is that it would boot fine with Bochs but would GPF on a real computer. So my recommendation is to use one of the tutorial kernel's if you are a beginner. As a side note though, the math library that comes with it is pretty good, and not under GPL.
Re: Can I use GNU libstdc++ for OS Development?
Posted: Tue Sep 30, 2008 11:06 am
by codemastersnake
Thanks for the above note...
Re: Can I use GNU libstdc++ for OS Development?
Posted: Tue Sep 30, 2008 11:26 am
by i586coder
HI, Snake:
I am glade to hear some one asked my question
In fact it's hard to find OS lib's that quite what you need
I tried Linux lib's but still hard for me understanding many functions,..,SO i decide to develop my own Lib's
and coded what i need (work in progress):
-FAT12
-mouse driver:serial,ps/2
-console I/O
-hardware detection
If you found any open-source OS lib's,please let me know