Final Platform Layer 0.9.8-beta
|
FPL uses built-in operating system libraries and requires a C99 or C++/11 compliant compiler.
Depending on the compiler and platform - linking to one system library may be needed:
By default, FPL uses the CRT (C-Runtime-Library) for functions such as vsnprintf(), but its usage is optional.
To learn how to use FPL without the CRT more details, see the page How to disable the use of the CRT in FPL
In one of your C/C++ translation-unit include this:
You can then include this file in any other C/C++ source or header file as you would with any other header file.
Provide the typical main entry point with at least the initialization and release of the platform:
To use FPL in multiple translation units, it is recommended to create a separated "final_platform_layer.c" file in the same directory FPL is located and define the implementation there only:
final_platform_layer.c:
This way FPL implementation is compiled once and can be used everywhere.
In your main translation-unit, you just include the entry point only using the preprocessor define FPL_ENTRYPOINT.
main_translation_unit.c:
To use FPL as a/in static library you do the same steps required for using FPL in multiple translation units. See How to use FPL in multiple translation units? for more details.
When FPL is compiled directly in your main translation-unit, some IDE's read the comments from the implementation bodies instead of from the header definitions.
This is wrong, but we can't help it. Those editors just are not designed for single-header-file libraries :-(
But do not fear, you can get the comments to show up in your IDE properly, just compile the implementation into a separated translation-unit only.
This way the IDE will parse the comments from the API declaration only. See How to use FPL in multiple translation units? for more details.
See Compiler Options for all compile-time options.