Resource Librarian

The resource librarian is used to merge resource files that have been created from a variety of sources. Its primary use is to build the final application (.ma) form of an MDL project. Because its output format is a standard compiled resource file, rlib can also be used to merge .rsc files. rlib can accept the following types of files as input:

The following command line syntax is used for the resource librarian:


If a file is provided without an extension, .rsc is assumed. .rsc files are broken down and merged together according to resourceclass. They are then written to the output file.

The following options are supported:

flag description
-c Compress the resource file, removing unused space
-f<format> Set format of output resource file
-o<filename> Specify the output filename. If this option is not specified, the output filename is determined from the first input filename. The default extension for output files is .rsc. If you are building the final form of an MDL application, be sure to specify .ma.
-r<resourceID> Restrict the librarian's operation to a particular resourceID.
-s"string" Specify the output file's identification string.
-t<class> Restrict the librarian's operation to a particular resourceclass. class is the resourceclass identifier as specified in the resourceclass statement. It can be specified in hex, decimal or character constant form. For example, -t'Msgs' and -t0x4d736773 are equivalent.
-v Verbose: show progress of the librarian.

Input files and command line switches can be provided in any order on the command line. Response files can also be used as they are with the resource compiler.


The resource library portion of basicrsc.mki reads:

$(reqdObjs)basic.mi : $(basicRscs)
> $(o)make.opt
$(RLibCmd) @$(o)make.opt

This rule calls the RLibCmd macro which is mapped to rlib.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.