BeIDE and ELF (on Intel)



As of BeOS Release 4.0, the Intel version of the BeIDE uses the ELF object format and the gcc compiler and tools.  This document describes how to convert your projects to ELF ( Converting a Project to ELF), how to fake a pre-compiled header in ELF ( Faking a Pre-compiled Header), and tells you how to enter gcc compiler and linker options ( Compiler and Linker Options).


Converting a Project to ELF

To use an Intel BeIDE project that were created before Release 4.0, follow the steps below.  Note that PPC project do not have to be converted.

  1. Open the project.  The Message window will report "no matching target record" errors.  This is normal.

  2. In the Project window, select Project > Remove Objects.

  3. Open the Settings window, select the Project > Target panel, and click Factory Settings and then Save.  You'll be asked to confirm in an alert; click OK.

  4. Still in the Settings window, select the Project > x86 ELF Project" panel, click Factory Settings, pick the appropriate Project Type, choose a File Name, and click Save (and then OK).

  5. Return to the Project window.  Remove these files:

  6. Still in the Project window, replace each library with its ELF counterpart from the ELF library directory /boot/develop/lib/x86.  The ELF libraries do not have the ".LIB" extension; for example, libroot.so.LIB becomes libroot.so.


    Faking a Pre-compiled Header

    The gcc tools don't support pre-compiled headers.  This creates a problem for developers who want to maintain project portability (between Intel and PPC).  There are two ways to work around this problem:  You can remove the pre-compiled headers from your PPC projects (and change your source to include the proper headers files), or you can include "fake" pre-compiled headers for your Intel projects.  The instructions for faking a pre-compiled header are given below:

    • Open the Settings window and go to the Other > More Compiler Options panel.
    • In the Enter additional desired gcc options: text field, type the following:

         -include /boot/develop/headers/be/precompiled/BeHeaders.pch++

    • Click Save and close the Settings window.

    This tells the compiler to include BeHeaders.pch++ in all files that are compiled.  Note that the file contains un-precompiled headers, so you won't improve compilation speed--in fact, it will probably slow down a bit.

    Do not use this option and generate debugging information at the same time.  Your compile time will slow to a crawl, and your application will assume the dimensions of a small whale.


    Compiler and Linker Options

    Some of the options are implied by the choices in the Settings window panels.  All other options can be entered in the Other > More Compiler Options and Other > More Linker Options panels.  For a full list of options, open a Terminal window and type

       gcc -v --help

    Note that not all of the options apply to Be applications.  Proceed with caution.






    BeOS Release 4.5




    Copyright © 1999 Be, Inc.  All rights reserved.