Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Hello world OS

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Hello world OS

    Hi, I'm trying to compile a hello world OS, but I get the following error

    [flethuseo@localhost Program]$ g++ -c copyboot.cpp
    copyboot.cpp:10:19: error: bios.h: No such file or directory
    copyboot.cpp: In function ‘void writebootsector(char*, int)’:
    copyboot.cpp:27: error: ‘biosdisk’ was not declared in this scope
    [flethuseo@localhost Program]$

    I've tried adding bios.hs to the folder but I get nowhere.. maybe I'm just adding the wrong ones.. anyone know how I can fix this error

  2. #2
    Banned jan1024188's Avatar
    Join Date
    Jul 2006

    1. Make sure you have a main.cpp file (which compiler wants). If you dont have one please rename copyboot.cpp to main.cpp
    2.make sure you have a "bios.h" in same directory as main.cpp
    3. If ‘void writebootsector(char*, int)’: is a main function please rename it to main. Also main function must be "int" and must return 0 or 1 value (which tells to OS if program finished as well.
    4. Declare biosdisk.

    I hope that helps,


Posting Permissions

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