Resource File Compiling

We begin with a plain text file and compile it into a binary format that can be utilized by PowerBASIC.  The plain text file is termed a Resource Script and these are stored with a .RC file extension.  A Resource Compiler is then used to create a binary (.RES) file, and finally, the binary file is converted into PowerBASIC resource file format (a .PBR file).

FILE.RC   >>>   FILE.RES   >>>   FILE.PBR

The PowerBASIC IDE can be loaded with a Resource Script (.RC file) and compile the script into PowerBASIC resource file format.  This is performed using the regular Compile Current File button or the RUN|Compile File menu item.

Once a .PBR file has been created, it can be embedded into an application EXE or DLL simply by using a #RESOURCE statement.  During compilation, PowerBASIC automatically embeds the resource file to create a single file that contains compiled code and resources.

#RESOURCE "DIALOGS.PBR"

 

See Also

What is a Resource File?

Resource Editors

Resource Scripts