The librdef library===================Of course, it would be cool if other applications (such as GUI resource editors) could also importand export rdef files. That is why the bulk of rc's functionality is implemented in a separateshared library, librdef.so.Using the library in your own applications is very simple. Here are some quick instructions to getyou started:1. ``#include "rdef.h"`` in your sources2. link your app to librdef.soThe API is rather bare-bones, but it gets the job done. The library uses files to transfer data toand from your application. This may seem odd, but it is actually a big advantage. After calling theAPI functions to compile an rdef file, you can use the standard BResources class to read theresources from the output file. Chances are high that your application already knows how to do this.To compile a resource file, the steps are typically this:1. Call ``rdef_add_include_dir()`` one or more times to add include file search paths.2. Call ``rdef_add_input_file()`` one or more times to add the rdef files that you want to compile.3. Call ``rdef_set_flags()`` to toggle compiler options.4. Call ``rdef_compile()`` with the name of the output file. This performs the actual compilation.5. Call ``rdef_free_input_files()`` to clear the list of input files that you added earlier.6. Call ``rdef_free_include_dirs()`` to clear the list of include directories that you added earlier.Decompiling is very similar, although include directories are not used here:1. Call ``rdef_add_input_file()`` one or more times to add the resource files that you want to decompile.2. Call ``rdef_set_flags()`` to toggle compiler options.3. Call ``rdef_decompile()`` with the name of the output file. The name of the header file (if any) will be automatically constructed by appending ".h" to the output file name.4. Call ``rdef_free_input_files()`` to clear the list of input files that you added earlier.If one of these functions returns something other than B_OK, an error occurred. You can look at thefollowing variables to find out more about the error, and construct meaningul error messages:rdef_errThe error code that was returned.rdef_err_lineThe line number where compilation failed.rdef_err_fileThe file where the error occurred.rdef_err_msgThe error message from the compiler.For more information about using librdef, see "rdef.h", which explains the available functions anddata structures in more depth. For a real-world example, take a look at "rc.cpp", which containsthe complete implementation of the rc compiler. As you'll see, there really isn't much to it,because librdef already does all the work.