.fx Files

Not all platforms supported by the Elements compiler provide the rich metadata that is required by the compiler to use the library, as part of the binary. For example, the Cocoa platform and many of the base platforms for Island depend on Objective-C or C header files (.h) normally processed by a C compiler at compile time.

Elements uses .fx files to express metadata for these binaries, so that the .h files do not need to be processed on each compile, and/or to provide metadata for libraries created by Elements itself.

  • .NET contains metadata in the .dll files themselves, so no .fx are used.
  • Java contains metadata in the .jar files themselves, so no .fx are used.
  • Cocoa uses .fx files for libraries (.a and .dylib) and frameworks (.framework). Read More.
  • Island uses .fx files for libraries (.a, .lib, .dll etc). Read More.

Imported .fx Files

Some .fx files are imported from C or Objective-C .h Header files using the FXGen tool. This includes all the base SDK framework .fx files for Cocoa that ship with Elements, as well as the core rtl.fx library that provides the lowlevel platform APIs on both Cocoa and Island.

If you have existing C or Objective-C style libraries as a binary and one or more .h. files, or as a .framework, then you can import those too with FXGen (included in Fire and Water in the "Tools" menu), in order to generate a .fx file that you can then referene in your Cocoa or Island projects.

Compiler-Generated .fx Files

When building libraries for Cocoa and Island with Elements, the compiler can of course avoid the extra step of generating and re-importing a .h file, and will emit a rich .fx file with all metadata for the library, automatically.

(You can still have the compiler also generate an optional .h file, if you want the library to be used from Xcode or from any C/C++ compiler available for the respective platform.)

See Also