C++ in creating OS
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Thread: C++ in creating OS

  1. #1
    Join Date
    Nov 2013
    Posts
    24

    C++ in creating OS

    Which C++ compiler is the best to create new operating system ?

  2. #2
    Join Date
    Jul 2013
    Posts
    168

    Re: C++ in creating OS

    Quote Originally Posted by ArnoldRich View Post
    Which C++ compiler is the best to create new operating system ?
    Most important for maximum portability is that you use C++ standard features only. No compiler specific extensions or libraries. And even so stick to "plain" C++. No exotic features. And I would leave C++ 11 features alone since it will be years until most compilers are standard compliant.

  3. #3
    Join Date
    Nov 2013
    Posts
    24

    Re: C++ in creating OS

    I've understood you.
    And what compiler to use?

  4. #4
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,643

    Re: C++ in creating OS

    if you create your own OS
    You will at the very least need to create your own runtime library to have the C++ library interface to the OS.
    If your OS has it's own executable format, you will probably need to create your own compiler, or at the least your own linker to produce executables in the formay your OS supports.


    if you are building on top of an existing OS, then you're easiest to use a compiler already supported on that OS.

  5. #5
    Join Date
    Dec 2012
    Location
    England
    Posts
    2,000

    Re: C++ in creating OS

    Quote Originally Posted by ArnoldRich View Post
    I've understood you.
    And what compiler to use?
    For which processor family?
    All advice is offered in good faith only. You are ultimately responsible for effects of your programs and the integrity of the machines they run on.

  6. #6
    Join Date
    Nov 2013
    Posts
    24

    Resolved Re: C++ in creating OS

    Quote Originally Posted by 2kaud View Post
    For which processor family?
    Intel.

  7. #7
    Join Date
    Nov 2013
    Posts
    24

    Re: C++ in creating OS

    I need to create my own runtime library to have the C++ library interface to the OS.
    My OS will have it's own executable format, so I will need to create my own compiler, or at the least my own linker to produce executables in the format my OS will support.
    Could you more precisily describe the steps, which are needed, in detail?

  8. #8
    Join Date
    Jul 2013
    Posts
    168

    Re: C++ in creating OS

    Quote Originally Posted by ArnoldRich View Post
    Could you more precisily describe the steps, which are needed, in detail?
    You need to become familiar with cross-compiling and bootstrapping.

    This is a start.

    http://wiki.osdev.org/GCC_Cross-Compiler
    Last edited by razzle; November 27th, 2013 at 01:20 AM.

  9. #9
    Join Date
    Jul 2013
    Posts
    168

    Re: C++ in creating OS

    continued ...

    I suggest you have a look at a small simple and cheap computer called Raspberry PI:

    http://www.makeuseof.com/tag/7-opera...-raspberry-pi/

    This may not be your immediate target machine but it's better to start small and use a hardware that's developed for educational purposes. And you get in touch with a user community sharing your interests where you can ask concrete questions. You may even be able to convince other people to try out your OS and give feedback and become costumers eventually.

    If you can get a rudimentary OS up and running on the Raspberry PI you've taken a big leap on the road to becoming the new Bill Gates or Steven Jobs . I would make Raspberry PI my first step.
    Last edited by razzle; November 27th, 2013 at 01:21 AM.

  10. #10
    Join Date
    Nov 2013
    Posts
    24

    Re: C++ in creating OS

    Quote Originally Posted by razzle View Post
    You need to become familiar with cross-compiling and bootstrapping.

    This is a start.

    http://wiki.osdev.org/GCC_Cross-Compiler
    Thank you.

  11. #11
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,643

    Re: C++ in creating OS

    Quote Originally Posted by ArnoldRich View Post
    Intel.
    that's a brand/company , not a processor family.

    Intel makes a wide variety of processor families and some families have many many subtypes.
    And some other manufacturers make "intel" compatible cpu's as well.


    I made my own bootstrap and C++library for an intel galileo (intel's "arduino clone"), and use a generic C++ compiler that outputs a form of bytecode binaries, then I covert the bytecode to galileo instructions.
    Hardest part in the lib was making the cin read from and cout write to the USB port and have the generic named streams behave as the input and output pins.
    Yes, there's a reason I didn't use the normal arduino dev kit for this (don't ask).

  12. #12
    Join Date
    Nov 2013
    Posts
    24

    Re: C++ in creating OS

    Quote Originally Posted by razzle View Post
    You need to become familiar with cross-compiling and bootstrapping.

    This is a start.

    http://wiki.osdev.org/GCC_Cross-Compiler
    Thank you.

  13. #13
    Join Date
    Nov 2013
    Posts
    24

    Re: C++ in creating OS

    Quote Originally Posted by razzle View Post
    continued ...

    I suggest you have a look at a small simple and cheap computer called Raspberry PI:

    http://www.makeuseof.com/tag/7-opera...-raspberry-pi/

    This may not be your immediate target machine but it's better to start small and use a hardware that's developed for educational purposes. And you get in touch with a user community sharing your interests where you can ask concrete questions. You may even be able to convince other people to try out your OS and give feedback and become costumers eventually.

    If you can get a rudimentary OS up and running on the Raspberry PI you've taken a big leap on the road to becoming the new Bill Gates or Steven Jobs . I would make Raspberry PI my first step.
    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center