Specifications
CHAPTER 8
130
The compc command-line compiler. You open the compc compiler from the command line to create a SWC file.
For more information, see “Using the compc component compiler” on page 130.
The component compiler has many of the same options as the application compilers, as described in “Ab o u t t h e
application compiler options” on page 139. The component compiler has additional options as described in
“About the component compiler options” on page 161.
Like the application compiler, you can use the
load-config option to point the component compiler to a config-
uration file, rather than specify command-line options or set the options in the Flex Library Compiler dialog box.
When you compile a SWC file, store the new file in a location that is not the same as the source files. If both sets
of files are accessible by Flex when you compile your application, unexpected behavior can occur.
The SWC files that are produced by the component compilers do not require an HTML wrapper because they are
used as themes, RSLs, or component libraries that are input to other compilers to create Flex applications. You
never deploy a SWC file that users can request directly.
Using the Flex Builder component compiler
You use the component compiler in Flex Builder to create SWC files. You do this by setting up a Flex Library
Project using the New Library Project command. You add MXML and ActionScript components, style sheets,
SWF files, and other assets to the project.
To open the Flex Builder component compiler, select Project > Build Project for your Flex Library Project.
You edit the compiler settings by using the settings on the Project > Properties > Flex Library Compiler dialog
box. Using the Additional Compiler Arguments field in this dialog box, you can set compiler options as if you were
using the command-line compiler. For information about the syntax for setting options in the Flex Library
Compiler dialog box, see “About the command-line compilers” on page 131.
You can set the value of some options using the GUI controls. To set the resource options in the Flex Library Build
Path dialog box, select Project > Properties > Flex Library Build Path.
Flex Builder does not expose a default configuration file to set compiler options but you can create your own and
pass it to the compiler with the
load-config option. For more information on setting compiler options with
configuration files, see “About configuration files” on page 134.
Using the compc component compiler
You use the compc command-line compiler to compile SWC files from MXML, ActionScript, and other source
files such as style sheets, images, and SWF files.
You can open the compc compiler as a shell script and executable file for use on Windows and UNIX systems. It
is in the flex_install_dir/bin directory in Flex SDK.










